diff --git a/.vscode/settings.json b/.vscode/settings.json index 9fe44aa8..d8a10c4f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,8 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, "prettier.documentSelectors": ["**/*.sol"], - "solidity.formatter": "prettier" + "solidity.formatter": "prettier", + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } diff --git a/packages/contracts-ethers/package.json b/packages/contracts-ethers/package.json index 4da178c1..2b99622b 100644 --- a/packages/contracts-ethers/package.json +++ b/packages/contracts-ethers/package.json @@ -1,7 +1,7 @@ { "name": "@vocdoni/gasless-voting-ethers", "author": "Vocdoni Association", - "version": "0.0.1-rc1", + "version": "0.0.1-rc3", "description": "Aragon DAO Gasless Voting Plugin contract definitions for ethers.js", "main": "dist/bundle-cjs.js", "module": "dist/bundle-esm.js", @@ -9,6 +9,10 @@ "publishConfig": { "access": "public" }, + "files": [ + "dist", + "types" + ], "keywords": [ "voting", "blockchain", diff --git a/packages/contracts/deploy/01_repo/10_create_repo.ts b/packages/contracts/deploy/01_repo/10_create_repo.ts index 941d767f..eb270980 100644 --- a/packages/contracts/deploy/01_repo/10_create_repo.ts +++ b/packages/contracts/deploy/01_repo/10_create_repo.ts @@ -65,4 +65,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = ['PluginRepo', 'Deployment']; +func.tags = ['PluginRepo']; diff --git a/packages/contracts/deploy/02_setup/10_setup.ts b/packages/contracts/deploy/02_setup/10_setup.ts index 42116abf..183c5b56 100644 --- a/packages/contracts/deploy/02_setup/10_setup.ts +++ b/packages/contracts/deploy/02_setup/10_setup.ts @@ -1,4 +1,5 @@ import {PLUGIN_SETUP_CONTRACT_NAME} from '../../plugin-settings'; +import {getTokensAddresses} from '../../utils/helpers'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; @@ -8,12 +9,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, getNamedAccounts} = hre; const {deploy} = deployments; const {deployer} = await getNamedAccounts(); + const addresses = getTokensAddresses(hre.network.name); + console.log('addresses', addresses); await deploy(PLUGIN_SETUP_CONTRACT_NAME, { from: deployer, args: [ - '0xf868169bde323f45005e476287f4c76411a610f8', - '0x073b8528bcfbb2454c8fa792558aa4a1e64c613b', + addresses[0], // GovernanceERC20 + addresses[1], // GovernanceWrappedERC20 ], log: true, }); diff --git a/packages/contracts/deploy/02_setup/12_publish.ts b/packages/contracts/deploy/02_setup/12_publish.ts index 674ff4d0..c5836b64 100644 --- a/packages/contracts/deploy/02_setup/12_publish.ts +++ b/packages/contracts/deploy/02_setup/12_publish.ts @@ -5,10 +5,11 @@ import { PLUGIN_SETUP_CONTRACT_NAME, VERSION, } from '../../plugin-settings'; +import {VocdoniVotingSetup__factory} from '../../typechain'; import {addCreatedVersion, getPluginInfo} from '../../utils/helpers'; import {toHex} from '../../utils/ipfs'; import {uploadToIPFS} from '../../utils/ipfs'; -import {PluginRepo__factory, PluginSetup__factory} from '@aragon/osx-ethers'; +import {PluginRepo__factory} from '@aragon/osx-ethers'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; @@ -22,10 +23,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // Upload the metadata to IPFS const releaseMetadataURI = `ipfs://${await uploadToIPFS( - JSON.stringify(METADATA.release), + JSON.stringify(METADATA.release) )}`; const buildMetadataURI = `ipfs://${await uploadToIPFS( - JSON.stringify(METADATA.build), + JSON.stringify(METADATA.build) )}`; console.log(`Uploaded release metadata: ${releaseMetadataURI}`); @@ -87,7 +88,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { throw Error('something went wrong'); } - const implementationAddress = await PluginSetup__factory.connect( + const implementationAddress = await VocdoniVotingSetup__factory.connect( setup.address, deployer ).implementation(); diff --git a/packages/contracts/deployments/goerli/VocdoniVotingSetup.json b/packages/contracts/deployments/goerli/VocdoniVotingSetup.json index 892dd605..33f70f55 100644 --- a/packages/contracts/deployments/goerli/VocdoniVotingSetup.json +++ b/packages/contracts/deployments/goerli/VocdoniVotingSetup.json @@ -1,5 +1,5 @@ { - "address": "0xf8454f52f3ecA6c1a9E5Da0119173832F208ab18", + "address": "0x6847B82F943D7a761F12878b93a25868408D6cc3", "abi": [ { "inputs": [ @@ -335,32 +335,32 @@ "type": "function" } ], - "transactionHash": "0xb2e1bdca4bec8d4d1013216473c8bf260c9a7741f05d1a1cd575225a00f6ab98", + "transactionHash": "0xf8fdaa6d7a5a34da27ca9bc339367a5d2390ce6f3e25e0944dddfb53d65a3079", "receipt": { "to": null, "from": "0x976867E31c8553177E99ed5CcbA1e995AafF94A1", - "contractAddress": "0xf8454f52f3ecA6c1a9E5Da0119173832F208ab18", - "transactionIndex": 27, - "gasUsed": "7376908", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000008000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000", - "blockHash": "0xddd41ea816e97001b493cb302f8fce310efd461562e8ad69f9f45e7272c2f187", - "transactionHash": "0xb2e1bdca4bec8d4d1013216473c8bf260c9a7741f05d1a1cd575225a00f6ab98", + "contractAddress": "0x6847B82F943D7a761F12878b93a25868408D6cc3", + "transactionIndex": 30, + "gasUsed": "7316969", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000080000000000000000400000000000020000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x30c5af520e9534fe5a71bfce97790afe338daa2ec8be4d9d70c16d543c7709df", + "transactionHash": "0xf8fdaa6d7a5a34da27ca9bc339367a5d2390ce6f3e25e0944dddfb53d65a3079", "logs": [ { - "transactionIndex": 27, - "blockNumber": 10008531, - "transactionHash": "0xb2e1bdca4bec8d4d1013216473c8bf260c9a7741f05d1a1cd575225a00f6ab98", - "address": "0x46f31156Ff2557EA7C1E592bdB3Ad81CfCCE297c", + "transactionIndex": 30, + "blockNumber": 10452517, + "transactionHash": "0xf8fdaa6d7a5a34da27ca9bc339367a5d2390ce6f3e25e0944dddfb53d65a3079", + "address": "0x39f85f184611A9A1D8e6bE042e4Fa9eE984F230b", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 87, - "blockHash": "0xddd41ea816e97001b493cb302f8fce310efd461562e8ad69f9f45e7272c2f187" + "logIndex": 151, + "blockHash": "0x30c5af520e9534fe5a71bfce97790afe338daa2ec8be4d9d70c16d543c7709df" } ], - "blockNumber": 10008531, - "cumulativeGasUsed": "13422081", + "blockNumber": 10452517, + "cumulativeGasUsed": "13473144", "status": 1, "byzantium": true }, @@ -368,11 +368,11 @@ "0xf868169bde323f45005e476287f4c76411a610f8", "0x073b8528bcfbb2454c8fa792558aa4a1e64c613b" ], - "numDeployments": 3, - "solcInputHash": "b0e20d5d39b114891cc9efbc3aed3959", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract GovernanceERC20\",\"name\":\"_governanceERC20Base\",\"type\":\"address\"},{\"internalType\":\"contract GovernanceWrappedERC20\",\"name\":\"_governanceWrappedERC20Base\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenNotContract\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenNotERC20\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"WrongHelpersArrayLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"governanceERC20Base\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceWrappedERC20Base\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"prepareInstallation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"helpers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"struct IPluginSetup.PreparedSetupData\",\"name\":\"preparedSetupData\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"currentHelpers\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IPluginSetup.SetupPayload\",\"name\":\"_payload\",\"type\":\"tuple\"}],\"name\":\"prepareUninstallation\",\"outputs\":[{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_currentBuild\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"currentHelpers\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IPluginSetup.SetupPayload\",\"name\":\"_payload\",\"type\":\"tuple\"}],\"name\":\"prepareUpdate\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"initData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"helpers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"struct IPluginSetup.PreparedSetupData\",\"name\":\"preparedSetupData\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Vocdoni\",\"errors\":{\"TokenNotContract(address)\":[{\"params\":{\"token\":\"The token address\"}}],\"TokenNotERC20(address)\":[{\"params\":{\"token\":\"The token address\"}}],\"WrongHelpersArrayLength(uint256)\":[{\"params\":{\"length\":\"The array length of passed helpers.\"}}]},\"kind\":\"dev\",\"methods\":{\"implementation()\":{\"details\":\"The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\",\"returns\":{\"_0\":\"The address of the plugin implementation contract.\"}},\"prepareInstallation(address,bytes)\":{\"params\":{\"_dao\":\"The address of the installing DAO.\",\"_data\":\"The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\"},\"returns\":{\"plugin\":\"The address of the `Plugin` contract being prepared for installation.\",\"preparedSetupData\":\"The deployed plugin's relevant data which consists of helpers and permissions.\"}},\"prepareUninstallation(address,(address,address[],bytes))\":{\"params\":{\"_dao\":\"The address of the uninstalling DAO.\",\"_payload\":\"The relevant data necessary for the `prepareUninstallation`. See above.\"},\"returns\":{\"permissions\":\"The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\"}},\"prepareUpdate(address,uint16,(address,address[],bytes))\":{\"params\":{\"_currentBuild\":\"The build number of the plugin to update from.\",\"_dao\":\"The address of the updating DAO.\",\"_payload\":\"The relevant data necessary for the `prepareUpdate`. See above.\"},\"returns\":{\"initData\":\"The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\",\"preparedSetupData\":\"The deployed plugin's relevant data which consists of helpers and permissions.\"}},\"supportsInterface(bytes4)\":{\"params\":{\"_interfaceId\":\"The ID of the interface.\"},\"returns\":{\"_0\":\"Returns `true` if the interface is supported.\"}}},\"title\":\"VocdoniVotingSetup\",\"version\":1},\"userdoc\":{\"errors\":{\"TokenNotContract(address)\":[{\"notice\":\"Thrown if token address is passed which is not a token.\"}],\"TokenNotERC20(address)\":[{\"notice\":\"Thrown if token address is not ERC20.\"}],\"WrongHelpersArrayLength(uint256)\":[{\"notice\":\"Thrown if passed helpers array is of wrong length.\"}]},\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"The contract constructor, that deploys the `VocdoniVoting` plugin logic contract.\"},\"governanceERC20Base()\":{\"notice\":\"The address of the `GovernanceERC20` base contract.\"},\"governanceWrappedERC20Base()\":{\"notice\":\"The address of the `GovernanceWrappedERC20` base contract.\"},\"implementation()\":{\"notice\":\"Returns the plugin implementation address.\"},\"prepareInstallation(address,bytes)\":{\"notice\":\"Prepares the installation of a plugin.\"},\"prepareUninstallation(address,(address,address[],bytes))\":{\"notice\":\"Prepares the uninstallation of a plugin.\"},\"prepareUpdate(address,uint16,(address,address[],bytes))\":{\"notice\":\"Prepares the update of a plugin.\"},\"supportsInterface(bytes4)\":{\"notice\":\"Checks if this or the parent contract supports an interface by its ID.\"}},\"notice\":\"The setup contract of the `VocdoniVoting` plugin.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/VocdoniVotingSetup.sol\":\"VocdoniVotingSetup\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"@aragon/osx/core/dao/DAO.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/interfaces/IERC1271.sol\\\";\\n\\nimport {IProtocolVersion} from \\\"../../utils/protocol/IProtocolVersion.sol\\\";\\nimport {ProtocolVersion} from \\\"../../utils/protocol/ProtocolVersion.sol\\\";\\nimport {PermissionManager} from \\\"../permission/PermissionManager.sol\\\";\\nimport {CallbackHandler} from \\\"../utils/CallbackHandler.sol\\\";\\nimport {hasBit, flipBit} from \\\"../utils/BitMap.sol\\\";\\nimport {IEIP4824} from \\\"./IEIP4824.sol\\\";\\nimport {IDAO} from \\\"./IDAO.sol\\\";\\n\\n/// @title DAO\\n/// @author Aragon Association - 2021-2023\\n/// @notice This contract is the entry point to the Aragon DAO framework and provides our users a simple and easy to use public interface.\\n/// @dev Public API of the Aragon DAO framework.\\ncontract DAO is\\n IEIP4824,\\n Initializable,\\n IERC1271,\\n ERC165StorageUpgradeable,\\n IDAO,\\n UUPSUpgradeable,\\n ProtocolVersion,\\n PermissionManager,\\n CallbackHandler\\n{\\n using SafeERC20Upgradeable for IERC20Upgradeable;\\n using AddressUpgradeable for address;\\n\\n /// @notice The ID of the permission required to call the `execute` function.\\n bytes32 public constant EXECUTE_PERMISSION_ID = keccak256(\\\"EXECUTE_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\\n bytes32 public constant UPGRADE_DAO_PERMISSION_ID = keccak256(\\\"UPGRADE_DAO_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `setMetadata` function.\\n bytes32 public constant SET_METADATA_PERMISSION_ID = keccak256(\\\"SET_METADATA_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `setTrustedForwarder` function.\\n bytes32 public constant SET_TRUSTED_FORWARDER_PERMISSION_ID =\\n keccak256(\\\"SET_TRUSTED_FORWARDER_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `setSignatureValidator` function.\\n bytes32 public constant SET_SIGNATURE_VALIDATOR_PERMISSION_ID =\\n keccak256(\\\"SET_SIGNATURE_VALIDATOR_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `registerStandardCallback` function.\\n bytes32 public constant REGISTER_STANDARD_CALLBACK_PERMISSION_ID =\\n keccak256(\\\"REGISTER_STANDARD_CALLBACK_PERMISSION\\\");\\n\\n /// @notice The internal constant storing the maximal action array length.\\n uint256 internal constant MAX_ACTIONS = 256;\\n\\n /// @notice The first out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set inidicating that a function was not entered.\\n uint256 private constant _NOT_ENTERED = 1;\\n\\n /// @notice The second out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set inidicating that a function was entered.\\n uint256 private constant _ENTERED = 2;\\n\\n /// @notice The [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @dev Added in v1.0.0.\\n IERC1271 public signatureValidator;\\n\\n /// @notice The address of the trusted forwarder verifying meta transactions.\\n /// @dev Added in v1.0.0.\\n address private trustedForwarder;\\n\\n /// @notice The [EIP-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI.\\n /// @dev Added in v1.0.0.\\n string private _daoURI;\\n\\n /// @notice The state variable for the reentrancy guard of the `execute` function.\\n /// @dev Added in v1.3.0. The variable can be of value `_NOT_ENTERED = 1` or `_ENTERED = 2` in usage and is initialized with `_NOT_ENTERED`.\\n uint256 private _reentrancyStatus;\\n\\n /// @notice Thrown if a call is reentrant.\\n error ReentrantCall();\\n\\n /// @notice Thrown if the action array length is larger than `MAX_ACTIONS`.\\n error TooManyActions();\\n\\n /// @notice Thrown if action execution has failed.\\n /// @param index The index of the action in the action array that failed.\\n error ActionFailed(uint256 index);\\n\\n /// @notice Thrown if an action has insufficent gas left.\\n error InsufficientGas();\\n\\n /// @notice Thrown if the deposit amount is zero.\\n error ZeroAmount();\\n\\n /// @notice Thrown if there is a mismatch between the expected and actually deposited amount of native tokens.\\n /// @param expected The expected native token amount.\\n /// @param actual The actual native token amount deposited.\\n error NativeTokenDepositAmountMismatch(uint256 expected, uint256 actual);\\n\\n /// @notice Thrown if an upgrade is not supported from a specific protocol version .\\n error ProtocolVersionUpgradeNotSupported(uint8[3] protocolVersion);\\n\\n /// @notice Emitted when a new DAO URI is set.\\n /// @param daoURI The new URI.\\n event NewURI(string daoURI);\\n\\n /// @notice A modifier to protect a function from calling itself, directly or indirectly (reentrancy).\\n /// @dev Currently, this modifier is only applied to the `execute()` function. If this is used multiple times, private `_beforeNonReentrant()` and `_afterNonReentrant()` functions should be created to prevent code duplication.\\n modifier nonReentrant() {\\n if (_reentrancyStatus == _ENTERED) {\\n revert ReentrantCall();\\n }\\n _reentrancyStatus = _ENTERED;\\n\\n _;\\n\\n _reentrancyStatus = _NOT_ENTERED;\\n }\\n\\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the DAO by\\n /// - setting the reentrancy status variable to `_NOT_ENTERED`\\n /// - registering the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID\\n /// - setting the trusted forwarder for meta transactions\\n /// - giving the `ROOT_PERMISSION_ID` permission to the initial owner (that should be revoked and transferred to the DAO after setup).\\n /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).\\n /// @param _metadata IPFS hash that points to all the metadata (logo, description, tags, etc.) of a DAO.\\n /// @param _initialOwner The initial owner of the DAO having the `ROOT_PERMISSION_ID` permission.\\n /// @param _trustedForwarder The trusted forwarder responsible for verifying meta transactions.\\n /// @param daoURI_ The DAO URI required to support [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824).\\n function initialize(\\n bytes calldata _metadata,\\n address _initialOwner,\\n address _trustedForwarder,\\n string calldata daoURI_\\n ) external reinitializer(2) {\\n _reentrancyStatus = _NOT_ENTERED; // added in v1.3.0\\n\\n _registerInterface(type(IDAO).interfaceId);\\n _registerInterface(type(IERC1271).interfaceId);\\n _registerInterface(type(IEIP4824).interfaceId);\\n _registerInterface(type(IProtocolVersion).interfaceId); // added in v1.3.0\\n _registerTokenInterfaces();\\n\\n _setMetadata(_metadata);\\n _setTrustedForwarder(_trustedForwarder);\\n _setDaoURI(daoURI_);\\n __PermissionManager_init(_initialOwner);\\n }\\n\\n /// @notice Initializes the DAO after an upgrade from a previous protocol version.\\n /// @param _previousProtocolVersion The semantic protocol version number of the previous DAO implementation contract this upgrade is transitioning from.\\n /// @param _initData The initialization data to be passed to via `upgradeToAndCall` (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)).\\n function initializeFrom(\\n uint8[3] calldata _previousProtocolVersion,\\n bytes calldata _initData\\n ) external reinitializer(2) {\\n _initData; // Silences the unused function parameter warning.\\n\\n // Check that the contract is not upgrading from a different major release.\\n if (_previousProtocolVersion[0] != 1) {\\n revert ProtocolVersionUpgradeNotSupported(_previousProtocolVersion);\\n }\\n\\n // Initialize `_reentrancyStatus` that was added in v1.3.0.\\n // Register Interface `ProtocolVersion` that was added in v1.3.0.\\n if (_previousProtocolVersion[1] <= 2) {\\n _reentrancyStatus = _NOT_ENTERED;\\n _registerInterface(type(IProtocolVersion).interfaceId);\\n }\\n }\\n\\n /// @inheritdoc PermissionManager\\n function isPermissionRestrictedForAnyAddr(\\n bytes32 _permissionId\\n ) internal pure override returns (bool) {\\n return\\n _permissionId == EXECUTE_PERMISSION_ID ||\\n _permissionId == UPGRADE_DAO_PERMISSION_ID ||\\n _permissionId == SET_METADATA_PERMISSION_ID ||\\n _permissionId == SET_TRUSTED_FORWARDER_PERMISSION_ID ||\\n _permissionId == SET_SIGNATURE_VALIDATOR_PERMISSION_ID ||\\n _permissionId == REGISTER_STANDARD_CALLBACK_PERMISSION_ID;\\n }\\n\\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n /// @dev The caller must have the `UPGRADE_DAO_PERMISSION_ID` permission.\\n function _authorizeUpgrade(address) internal virtual override auth(UPGRADE_DAO_PERMISSION_ID) {}\\n\\n /// @inheritdoc IDAO\\n function setTrustedForwarder(\\n address _newTrustedForwarder\\n ) external override auth(SET_TRUSTED_FORWARDER_PERMISSION_ID) {\\n _setTrustedForwarder(_newTrustedForwarder);\\n }\\n\\n /// @inheritdoc IDAO\\n function getTrustedForwarder() external view virtual override returns (address) {\\n return trustedForwarder;\\n }\\n\\n /// @inheritdoc IDAO\\n function hasPermission(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) external view override returns (bool) {\\n return isGranted(_where, _who, _permissionId, _data);\\n }\\n\\n /// @inheritdoc IDAO\\n function setMetadata(\\n bytes calldata _metadata\\n ) external override auth(SET_METADATA_PERMISSION_ID) {\\n _setMetadata(_metadata);\\n }\\n\\n /// @inheritdoc IDAO\\n function execute(\\n bytes32 _callId,\\n Action[] calldata _actions,\\n uint256 _allowFailureMap\\n )\\n external\\n override\\n nonReentrant\\n auth(EXECUTE_PERMISSION_ID)\\n returns (bytes[] memory execResults, uint256 failureMap)\\n {\\n // Check that the action array length is within bounds.\\n if (_actions.length > MAX_ACTIONS) {\\n revert TooManyActions();\\n }\\n\\n execResults = new bytes[](_actions.length);\\n\\n uint256 gasBefore;\\n uint256 gasAfter;\\n\\n for (uint256 i = 0; i < _actions.length; ) {\\n gasBefore = gasleft();\\n\\n (bool success, bytes memory result) = _actions[i].to.call{value: _actions[i].value}(\\n _actions[i].data\\n );\\n gasAfter = gasleft();\\n\\n // Check if failure is allowed\\n if (!hasBit(_allowFailureMap, uint8(i))) {\\n // Check if the call failed.\\n if (!success) {\\n revert ActionFailed(i);\\n }\\n } else {\\n // Check if the call failed.\\n if (!success) {\\n // Make sure that the action call did not fail because 63/64 of `gasleft()` was insufficient to execute the external call `.to.call` (see [ERC-150](https://eips.ethereum.org/EIPS/eip-150)).\\n // In specific scenarios, i.e. proposal execution where the last action in the action array is allowed to fail, the account calling `execute` could force-fail this action by setting a gas limit\\n // where 63/64 is insufficient causing the `.to.call` to fail, but where the remaining 1/64 gas are sufficient to successfully finish the `execute` call.\\n if (gasAfter < gasBefore / 64) {\\n revert InsufficientGas();\\n }\\n\\n // Store that this action failed.\\n failureMap = flipBit(failureMap, uint8(i));\\n }\\n }\\n\\n execResults[i] = result;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit Executed({\\n actor: msg.sender,\\n callId: _callId,\\n actions: _actions,\\n allowFailureMap: _allowFailureMap,\\n failureMap: failureMap,\\n execResults: execResults\\n });\\n }\\n\\n /// @inheritdoc IDAO\\n function deposit(\\n address _token,\\n uint256 _amount,\\n string calldata _reference\\n ) external payable override {\\n if (_amount == 0) revert ZeroAmount();\\n\\n if (_token == address(0)) {\\n if (msg.value != _amount)\\n revert NativeTokenDepositAmountMismatch({expected: _amount, actual: msg.value});\\n } else {\\n if (msg.value != 0)\\n revert NativeTokenDepositAmountMismatch({expected: 0, actual: msg.value});\\n\\n IERC20Upgradeable(_token).safeTransferFrom(msg.sender, address(this), _amount);\\n }\\n\\n emit Deposited(msg.sender, _token, _amount, _reference);\\n }\\n\\n /// @inheritdoc IDAO\\n function setSignatureValidator(\\n address _signatureValidator\\n ) external override auth(SET_SIGNATURE_VALIDATOR_PERMISSION_ID) {\\n signatureValidator = IERC1271(_signatureValidator);\\n\\n emit SignatureValidatorSet({signatureValidator: _signatureValidator});\\n }\\n\\n /// @inheritdoc IDAO\\n function isValidSignature(\\n bytes32 _hash,\\n bytes memory _signature\\n ) external view override(IDAO, IERC1271) returns (bytes4) {\\n if (address(signatureValidator) == address(0)) {\\n // Return the invalid magic number\\n return bytes4(0);\\n }\\n // Forward the call to the set signature validator contract\\n return signatureValidator.isValidSignature(_hash, _signature);\\n }\\n\\n /// @notice Emits the `NativeTokenDeposited` event to track native token deposits that weren't made via the deposit method.\\n /// @dev This call is bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\\n /// Gas cost increases in future hard forks might break this function. As an alternative, [ERC-2930](https://eips.ethereum.org/EIPS/eip-2930)-type transactions using access lists can be employed.\\n receive() external payable {\\n emit NativeTokenDeposited(msg.sender, msg.value);\\n }\\n\\n /// @notice Fallback to handle future versions of the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) standard.\\n /// @param _input An alias being equivalent to `msg.data`. This feature of the fallback function was introduced with the [solidity compiler version 0.7.6](https://github.com/ethereum/solidity/releases/tag/v0.7.6)\\n /// @return The magic number registered for the function selector triggering the fallback.\\n fallback(bytes calldata _input) external returns (bytes memory) {\\n bytes4 magicNumber = _handleCallback(msg.sig, _input);\\n return abi.encode(magicNumber);\\n }\\n\\n /// @notice Emits the MetadataSet event if new metadata is set.\\n /// @param _metadata Hash of the IPFS metadata object.\\n function _setMetadata(bytes calldata _metadata) internal {\\n emit MetadataSet(_metadata);\\n }\\n\\n /// @notice Sets the trusted forwarder on the DAO and emits the associated event.\\n /// @param _trustedForwarder The trusted forwarder address.\\n function _setTrustedForwarder(address _trustedForwarder) internal {\\n trustedForwarder = _trustedForwarder;\\n\\n emit TrustedForwarderSet(_trustedForwarder);\\n }\\n\\n /// @notice Registers the [ERC-721](https://eips.ethereum.org/EIPS/eip-721) and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) interfaces and callbacks.\\n function _registerTokenInterfaces() private {\\n _registerInterface(type(IERC721ReceiverUpgradeable).interfaceId);\\n _registerInterface(type(IERC1155ReceiverUpgradeable).interfaceId);\\n\\n _registerCallback(\\n IERC721ReceiverUpgradeable.onERC721Received.selector,\\n IERC721ReceiverUpgradeable.onERC721Received.selector\\n );\\n _registerCallback(\\n IERC1155ReceiverUpgradeable.onERC1155Received.selector,\\n IERC1155ReceiverUpgradeable.onERC1155Received.selector\\n );\\n _registerCallback(\\n IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector,\\n IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector\\n );\\n }\\n\\n /// @inheritdoc IDAO\\n function registerStandardCallback(\\n bytes4 _interfaceId,\\n bytes4 _callbackSelector,\\n bytes4 _magicNumber\\n ) external override auth(REGISTER_STANDARD_CALLBACK_PERMISSION_ID) {\\n _registerInterface(_interfaceId);\\n _registerCallback(_callbackSelector, _magicNumber);\\n emit StandardCallbackRegistered(_interfaceId, _callbackSelector, _magicNumber);\\n }\\n\\n /// @inheritdoc IEIP4824\\n function daoURI() external view returns (string memory) {\\n return _daoURI;\\n }\\n\\n /// @notice Updates the set DAO URI to a new value.\\n /// @param newDaoURI The new DAO URI to be set.\\n function setDaoURI(string calldata newDaoURI) external auth(SET_METADATA_PERMISSION_ID) {\\n _setDaoURI(newDaoURI);\\n }\\n\\n /// @notice Sets the new [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI and emits the associated event.\\n /// @param daoURI_ The new DAO URI.\\n function _setDaoURI(string calldata daoURI_) internal {\\n _daoURI = daoURI_;\\n\\n emit NewURI(daoURI_);\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0x86e1551c4c685e5bb38a6a68ffac0b390b3aa883f8dc9e1a45d321bceb1a7cc8\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/dao/IDAO.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IDAO\\n/// @author Aragon Association - 2022-2023\\n/// @notice The interface required for DAOs within the Aragon App DAO framework.\\ninterface IDAO {\\n /// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call.\\n /// @param to The address to call.\\n /// @param value The native token value to be sent with the call.\\n /// @param data The bytes-encoded function selector and calldata for the call.\\n struct Action {\\n address to;\\n uint256 value;\\n bytes data;\\n }\\n\\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\\n /// @param _where The address of the contract.\\n /// @param _who The address of a EOA or contract to give the permissions.\\n /// @param _permissionId The permission identifier.\\n /// @param _data The optional data passed to the `PermissionCondition` registered.\\n /// @return Returns true if the address has permission, false if not.\\n function hasPermission(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) external view returns (bool);\\n\\n /// @notice Updates the DAO metadata (e.g., an IPFS hash).\\n /// @param _metadata The IPFS hash of the new metadata object.\\n function setMetadata(bytes calldata _metadata) external;\\n\\n /// @notice Emitted when the DAO metadata is updated.\\n /// @param metadata The IPFS hash of the new metadata object.\\n event MetadataSet(bytes metadata);\\n\\n /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire execution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.\\n /// @param _callId The ID of the call. The definition of the value of `callId` is up to the calling contract and can be used, e.g., as a nonce.\\n /// @param _actions The array of actions.\\n /// @param _allowFailureMap A bitmap allowing execution to succeed, even if individual actions might revert. If the bit at index `i` is 1, the execution succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\\n /// @return The array of results obtained from the executed actions in `bytes`.\\n /// @return The resulting failure map containing the actions have actually failed.\\n function execute(\\n bytes32 _callId,\\n Action[] memory _actions,\\n uint256 _allowFailureMap\\n ) external returns (bytes[] memory, uint256);\\n\\n /// @notice Emitted when a proposal is executed.\\n /// @param actor The address of the caller.\\n /// @param callId The ID of the call.\\n /// @param actions The array of actions executed.\\n /// @param allowFailureMap The allow failure map encoding which actions are allowed to fail.\\n /// @param failureMap The failure map encoding which actions have failed.\\n /// @param execResults The array with the results of the executed actions.\\n /// @dev The value of `callId` is defined by the component/contract calling the execute function. A `Plugin` implementation can use it, for example, as a nonce.\\n event Executed(\\n address indexed actor,\\n bytes32 callId,\\n Action[] actions,\\n uint256 allowFailureMap,\\n uint256 failureMap,\\n bytes[] execResults\\n );\\n\\n /// @notice Emitted when a standard callback is registered.\\n /// @param interfaceId The ID of the interface.\\n /// @param callbackSelector The selector of the callback function.\\n /// @param magicNumber The magic number to be registered for the callback function selector.\\n event StandardCallbackRegistered(\\n bytes4 interfaceId,\\n bytes4 callbackSelector,\\n bytes4 magicNumber\\n );\\n\\n /// @notice Deposits (native) tokens to the DAO contract with a reference string.\\n /// @param _token The address of the token or address(0) in case of the native token.\\n /// @param _amount The amount of tokens to deposit.\\n /// @param _reference The reference describing the deposit reason.\\n function deposit(address _token, uint256 _amount, string calldata _reference) external payable;\\n\\n /// @notice Emitted when a token deposit has been made to the DAO.\\n /// @param sender The address of the sender.\\n /// @param token The address of the deposited token.\\n /// @param amount The amount of tokens deposited.\\n /// @param _reference The reference describing the deposit reason.\\n event Deposited(\\n address indexed sender,\\n address indexed token,\\n uint256 amount,\\n string _reference\\n );\\n\\n /// @notice Emitted when a native token deposit has been made to the DAO.\\n /// @dev This event is intended to be emitted in the `receive` function and is therefore bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\\n /// @param sender The address of the sender.\\n /// @param amount The amount of native tokens deposited.\\n event NativeTokenDeposited(address sender, uint256 amount);\\n\\n /// @notice Setter for the trusted forwarder verifying the meta transaction.\\n /// @param _trustedForwarder The trusted forwarder address.\\n function setTrustedForwarder(address _trustedForwarder) external;\\n\\n /// @notice Getter for the trusted forwarder verifying the meta transaction.\\n /// @return The trusted forwarder address.\\n function getTrustedForwarder() external view returns (address);\\n\\n /// @notice Emitted when a new TrustedForwarder is set on the DAO.\\n /// @param forwarder the new forwarder address.\\n event TrustedForwarderSet(address forwarder);\\n\\n /// @notice Setter for the [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @param _signatureValidator The address of the signature validator.\\n function setSignatureValidator(address _signatureValidator) external;\\n\\n /// @notice Emitted when the signature validator address is updated.\\n /// @param signatureValidator The address of the signature validator.\\n event SignatureValidatorSet(address signatureValidator);\\n\\n /// @notice Checks whether a signature is valid for the provided hash by forwarding the call to the set [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @param _hash The hash of the data to be signed.\\n /// @param _signature The signature byte array associated with `_hash`.\\n /// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid.\\n function isValidSignature(bytes32 _hash, bytes memory _signature) external returns (bytes4);\\n\\n /// @notice Registers an ERC standard having a callback by registering its [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID and callback function signature.\\n /// @param _interfaceId The ID of the interface.\\n /// @param _callbackSelector The selector of the callback function.\\n /// @param _magicNumber The magic number to be registered for the function signature.\\n function registerStandardCallback(\\n bytes4 _interfaceId,\\n bytes4 _callbackSelector,\\n bytes4 _magicNumber\\n ) external;\\n}\\n\",\"keccak256\":\"0x3876d62c73312234c1e2ab4e75cdac2783a6688c3445a67a15b767cd98e01f80\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/dao/IEIP4824.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\n/// @title EIP-4824 Common Interfaces for DAOs\\n/// @dev See https://eips.ethereum.org/EIPS/eip-4824\\n/// @author Aragon Association - 2021-2023\\ninterface IEIP4824 {\\n /// @notice A distinct Uniform Resource Identifier (URI) pointing to a JSON object following the \\\"EIP-4824 DAO JSON-LD Schema\\\". This JSON file splits into four URIs: membersURI, proposalsURI, activityLogURI, and governanceURI. The membersURI should point to a JSON file that conforms to the \\\"EIP-4824 Members JSON-LD Schema\\\". The proposalsURI should point to a JSON file that conforms to the \\\"EIP-4824 Proposals JSON-LD Schema\\\". The activityLogURI should point to a JSON file that conforms to the \\\"EIP-4824 Activity Log JSON-LD Schema\\\". The governanceURI should point to a flatfile, normatively a .md file. Each of the JSON files named above can be statically hosted or dynamically-generated.\\n /// @return _daoURI The DAO URI.\\n function daoURI() external view returns (string memory _daoURI);\\n}\\n\",\"keccak256\":\"0x8daa4bf72f8686ccea0441c3a0d8c10a5f4dc95e98351dc984346c099cc4db31\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/IPermissionCondition.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IPermissionCondition\\n/// @author Aragon Association - 2021-2023\\n/// @notice An interface to be implemented to support custom permission logic.\\n/// @dev To attach a condition to a permission, the `grantWithCondition` function must be used and refer to the implementing contract's address with the `condition` argument.\\ninterface IPermissionCondition {\\n /// @notice Checks if a call is permitted.\\n /// @param _where The address of the target contract.\\n /// @param _who The address (EOA or contract) for which the permissions are checked.\\n /// @param _permissionId The permission identifier.\\n /// @param _data Optional data passed to the `PermissionCondition` implementation.\\n /// @return isPermitted Returns true if the call is permitted.\\n function isGranted(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes calldata _data\\n ) external view returns (bool isPermitted);\\n}\\n\",\"keccak256\":\"0x942512b35407f9528ca209f8593fc179e36f93f689d507e04b27ad833ec5d141\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/PermissionCondition.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ERC165} from \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nimport {IPermissionCondition} from \\\"./IPermissionCondition.sol\\\";\\n\\n/// @title PermissionCondition\\n/// @author Aragon Association - 2023\\n/// @notice An abstract contract for non-upgradeable contracts instantiated via the `new` keyword to inherit from to support customary permissions depending on arbitrary on-chain state.\\nabstract contract PermissionCondition is ERC165, IPermissionCondition {\\n /// @notice Checks if an interface is supported by this or its parent contract.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPermissionCondition).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xd1a93aef06dce5ffcf566e5fc7e56991caa954f8bd477ae66f1ab5a7fd4c9527\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/PermissionLib.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title PermissionLib\\n/// @author Aragon Association - 2021-2023\\n/// @notice A library containing objects for permission processing.\\nlibrary PermissionLib {\\n /// @notice A constant expressing that no condition is applied to a permission.\\n address public constant NO_CONDITION = address(0);\\n\\n /// @notice The types of permission operations available in the `PermissionManager`.\\n /// @param Grant The grant operation setting a permission without a condition.\\n /// @param Revoke The revoke operation removing a permission (that was granted with or without a condition).\\n /// @param GrantWithCondition The grant operation setting a permission with a condition.\\n enum Operation {\\n Grant,\\n Revoke,\\n GrantWithCondition\\n }\\n\\n /// @notice A struct containing the information for a permission to be applied on a single target contract without a condition.\\n /// @param operation The permission operation type.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param permissionId The permission identifier.\\n struct SingleTargetPermission {\\n Operation operation;\\n address who;\\n bytes32 permissionId;\\n }\\n\\n /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a condition.\\n /// @param operation The permission operation type.\\n /// @param where The address of the target contract for which `who` receives permission.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\\n /// @param permissionId The permission identifier.\\n struct MultiTargetPermission {\\n Operation operation;\\n address where;\\n address who;\\n address condition;\\n bytes32 permissionId;\\n }\\n}\\n\",\"keccak256\":\"0x9b27fa8990e0f1623055187b8ade9363a6c8a1f15aab900e3a6e5cb312545c02\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/PermissionManager.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\n\\nimport {IPermissionCondition} from \\\"./IPermissionCondition.sol\\\";\\nimport {PermissionCondition} from \\\"./PermissionCondition.sol\\\";\\nimport \\\"./PermissionLib.sol\\\";\\n\\n/// @title PermissionManager\\n/// @author Aragon Association - 2021-2023\\n/// @notice The abstract permission manager used in a DAO, its associated plugins, and other framework-related components.\\nabstract contract PermissionManager is Initializable {\\n using AddressUpgradeable for address;\\n\\n /// @notice The ID of the permission required to call the `grant`, `grantWithCondition`, `revoke`, and `bulk` function.\\n bytes32 public constant ROOT_PERMISSION_ID = keccak256(\\\"ROOT_PERMISSION\\\");\\n\\n /// @notice A special address encoding permissions that are valid for any address `who` or `where`.\\n address internal constant ANY_ADDR = address(type(uint160).max);\\n\\n /// @notice A special address encoding if a permissions is not set and therefore not allowed.\\n address internal constant UNSET_FLAG = address(0);\\n\\n /// @notice A special address encoding if a permission is allowed.\\n address internal constant ALLOW_FLAG = address(2);\\n\\n /// @notice A mapping storing permissions as hashes (i.e., `permissionHash(where, who, permissionId)`) and their status encoded by an address (unset, allowed, or redirecting to a `PermissionCondition`).\\n mapping(bytes32 => address) internal permissionsHashed;\\n\\n /// @notice Thrown if a call is unauthorized.\\n /// @param where The context in which the authorization reverted.\\n /// @param who The address (EOA or contract) missing the permission.\\n /// @param permissionId The permission identifier.\\n error Unauthorized(address where, address who, bytes32 permissionId);\\n\\n /// @notice Thrown if a permission has been already granted with a different condition.\\n /// @dev This makes sure that condition on the same permission can not be overwriten by a different condition.\\n /// @param where The address of the target contract to grant `_who` permission to.\\n /// @param who The address (EOA or contract) to which the permission has already been granted.\\n /// @param permissionId The permission identifier.\\n /// @param currentCondition The current condition set for permissionId.\\n /// @param newCondition The new condition it tries to set for permissionId.\\n error PermissionAlreadyGrantedForDifferentCondition(\\n address where,\\n address who,\\n bytes32 permissionId,\\n address currentCondition,\\n address newCondition\\n );\\n\\n /// @notice Thrown if a condition address is not a contract.\\n /// @param condition The address that is not a contract.\\n error ConditionNotAContract(IPermissionCondition condition);\\n\\n /// @notice Thrown if a condition contract does not support the `IPermissionCondition` interface.\\n /// @param condition The address that is not a contract.\\n error ConditionInterfacNotSupported(IPermissionCondition condition);\\n\\n /// @notice Thrown for `ROOT_PERMISSION_ID` or `EXECUTE_PERMISSION_ID` permission grants where `who` or `where` is `ANY_ADDR`.\\n\\n error PermissionsForAnyAddressDisallowed();\\n\\n /// @notice Thrown for permission grants where `who` and `where` are both `ANY_ADDR`.\\n error AnyAddressDisallowedForWhoAndWhere();\\n\\n /// @notice Thrown if `Operation.GrantWithCondition` is requested as an operation but the method does not support it.\\n error GrantWithConditionNotSupported();\\n\\n /// @notice Emitted when a permission `permission` is granted in the context `here` to the address `_who` for the contract `_where`.\\n /// @param permissionId The permission identifier.\\n /// @param here The address of the context in which the permission is granted.\\n /// @param where The address of the target contract for which `_who` receives permission.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param condition The address `ALLOW_FLAG` for regular permissions or, alternatively, the `IPermissionCondition` contract implementation to be used.\\n event Granted(\\n bytes32 indexed permissionId,\\n address indexed here,\\n address where,\\n address indexed who,\\n address condition\\n );\\n\\n /// @notice Emitted when a permission `permission` is revoked in the context `here` from the address `_who` for the contract `_where`.\\n /// @param permissionId The permission identifier.\\n /// @param here The address of the context in which the permission is revoked.\\n /// @param where The address of the target contract for which `_who` loses permission.\\n /// @param who The address (EOA or contract) losing the permission.\\n event Revoked(\\n bytes32 indexed permissionId,\\n address indexed here,\\n address where,\\n address indexed who\\n );\\n\\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through this permission manager.\\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\\n modifier auth(bytes32 _permissionId) {\\n _auth(_permissionId);\\n _;\\n }\\n\\n /// @notice Initialization method to set the initial owner of the permission manager.\\n /// @dev The initial owner is granted the `ROOT_PERMISSION_ID` permission.\\n /// @param _initialOwner The initial owner of the permission manager.\\n function __PermissionManager_init(address _initialOwner) internal onlyInitializing {\\n _initializePermissionManager(_initialOwner);\\n }\\n\\n /// @notice Grants permission to an address to call methods in a contract guarded by an auth modifier with the specified permission identifier.\\n /// @dev Requires the `ROOT_PERMISSION_ID` permission.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) receiving the permission.\\n /// @param _permissionId The permission identifier.\\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function grant(\\n address _where,\\n address _who,\\n bytes32 _permissionId\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n _grant(_where, _who, _permissionId);\\n }\\n\\n /// @notice Grants permission to an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier if the referenced condition permits it.\\n /// @dev Requires the `ROOT_PERMISSION_ID` permission\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) receiving the permission.\\n /// @param _permissionId The permission identifier.\\n /// @param _condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function grantWithCondition(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n IPermissionCondition _condition\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n _grantWithCondition(_where, _who, _permissionId, _condition);\\n }\\n\\n /// @notice Revokes permission from an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier.\\n /// @dev Requires the `ROOT_PERMISSION_ID` permission.\\n /// @param _where The address of the target contract for which `_who` loses permission.\\n /// @param _who The address (EOA or contract) losing the permission.\\n /// @param _permissionId The permission identifier.\\n /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function revoke(\\n address _where,\\n address _who,\\n bytes32 _permissionId\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n _revoke(_where, _who, _permissionId);\\n }\\n\\n /// @notice Applies an array of permission operations on a single target contracts `_where`.\\n /// @param _where The address of the single target contract.\\n /// @param items The array of single-targeted permission operations to apply.\\n function applySingleTargetPermissions(\\n address _where,\\n PermissionLib.SingleTargetPermission[] calldata items\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n for (uint256 i; i < items.length; ) {\\n PermissionLib.SingleTargetPermission memory item = items[i];\\n\\n if (item.operation == PermissionLib.Operation.Grant) {\\n _grant(_where, item.who, item.permissionId);\\n } else if (item.operation == PermissionLib.Operation.Revoke) {\\n _revoke(_where, item.who, item.permissionId);\\n } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\\n revert GrantWithConditionNotSupported();\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Applies an array of permission operations on multiple target contracts `items[i].where`.\\n /// @param _items The array of multi-targeted permission operations to apply.\\n function applyMultiTargetPermissions(\\n PermissionLib.MultiTargetPermission[] calldata _items\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n for (uint256 i; i < _items.length; ) {\\n PermissionLib.MultiTargetPermission memory item = _items[i];\\n\\n if (item.operation == PermissionLib.Operation.Grant) {\\n _grant(item.where, item.who, item.permissionId);\\n } else if (item.operation == PermissionLib.Operation.Revoke) {\\n _revoke(item.where, item.who, item.permissionId);\\n } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\\n _grantWithCondition(\\n item.where,\\n item.who,\\n item.permissionId,\\n IPermissionCondition(item.condition)\\n );\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) for which the permission is checked.\\n /// @param _permissionId The permission identifier.\\n /// @param _data The optional data passed to the `PermissionCondition` registered.\\n /// @return Returns true if `_who` has the permissions on the target contract via the specified permission identifier.\\n function isGranted(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) public view virtual returns (bool) {\\n return\\n _isGranted(_where, _who, _permissionId, _data) || // check if `_who` has permission for `_permissionId` on `_where`\\n _isGranted(_where, ANY_ADDR, _permissionId, _data) || // check if anyone has permission for `_permissionId` on `_where`\\n _isGranted(ANY_ADDR, _who, _permissionId, _data); // check if `_who` has permission for `_permissionI` on any contract\\n }\\n\\n /// @notice Grants the `ROOT_PERMISSION_ID` permission to the initial owner during initialization of the permission manager.\\n /// @param _initialOwner The initial owner of the permission manager.\\n function _initializePermissionManager(address _initialOwner) internal {\\n _grant(address(this), _initialOwner, ROOT_PERMISSION_ID);\\n }\\n\\n /// @notice This method is used in the external `grant` method of the permission manager.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function _grant(address _where, address _who, bytes32 _permissionId) internal virtual {\\n if (_where == ANY_ADDR || _who == ANY_ADDR) {\\n revert PermissionsForAnyAddressDisallowed();\\n }\\n\\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\\n\\n address currentFlag = permissionsHashed[permHash];\\n\\n // Means permHash is not currently set.\\n if (currentFlag == UNSET_FLAG) {\\n permissionsHashed[permHash] = ALLOW_FLAG;\\n\\n emit Granted(_permissionId, msg.sender, _where, _who, ALLOW_FLAG);\\n }\\n }\\n\\n /// @notice This method is used in the external `grantWithCondition` method of the permission manager.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @param _condition An address either resolving to a `PermissionCondition` contract address or being the `ALLOW_FLAG` address (`address(2)`).\\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function _grantWithCondition(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n IPermissionCondition _condition\\n ) internal virtual {\\n address conditionAddr = address(_condition);\\n\\n if (!conditionAddr.isContract()) {\\n revert ConditionNotAContract(_condition);\\n }\\n\\n if (\\n !PermissionCondition(conditionAddr).supportsInterface(\\n type(IPermissionCondition).interfaceId\\n )\\n ) {\\n revert ConditionInterfacNotSupported(_condition);\\n }\\n\\n if (_where == ANY_ADDR && _who == ANY_ADDR) {\\n revert AnyAddressDisallowedForWhoAndWhere();\\n }\\n\\n if (_where == ANY_ADDR || _who == ANY_ADDR) {\\n if (\\n _permissionId == ROOT_PERMISSION_ID ||\\n isPermissionRestrictedForAnyAddr(_permissionId)\\n ) {\\n revert PermissionsForAnyAddressDisallowed();\\n }\\n }\\n\\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\\n\\n address currentCondition = permissionsHashed[permHash];\\n\\n // Means permHash is not currently set.\\n if (currentCondition == UNSET_FLAG) {\\n permissionsHashed[permHash] = conditionAddr;\\n\\n emit Granted(_permissionId, msg.sender, _where, _who, conditionAddr);\\n } else if (currentCondition != conditionAddr) {\\n // Revert if `permHash` is already granted, but uses a different condition.\\n // If we don't revert, we either should:\\n // - allow overriding the condition on the same permission\\n // which could be confusing whoever granted the same permission first\\n // - or do nothing and succeed silently which could be confusing for the caller.\\n revert PermissionAlreadyGrantedForDifferentCondition({\\n where: _where,\\n who: _who,\\n permissionId: _permissionId,\\n currentCondition: currentCondition,\\n newCondition: conditionAddr\\n });\\n }\\n }\\n\\n /// @notice This method is used in the public `revoke` method of the permission manager.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that might have been granted in parallel.\\n function _revoke(address _where, address _who, bytes32 _permissionId) internal virtual {\\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\\n if (permissionsHashed[permHash] != UNSET_FLAG) {\\n permissionsHashed[permHash] = UNSET_FLAG;\\n\\n emit Revoked(_permissionId, msg.sender, _where, _who);\\n }\\n }\\n\\n /// @notice Checks if a caller is granted permissions on a target contract via a permission identifier and redirects the approval to a `PermissionCondition` if this was specified in the setup.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @param _data The optional data passed to the `PermissionCondition` registered.\\n /// @return Returns true if `_who` has the permissions on the contract via the specified permissionId identifier.\\n function _isGranted(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) internal view virtual returns (bool) {\\n address accessFlagOrCondition = permissionsHashed[\\n permissionHash(_where, _who, _permissionId)\\n ];\\n\\n if (accessFlagOrCondition == UNSET_FLAG) return false;\\n if (accessFlagOrCondition == ALLOW_FLAG) return true;\\n\\n // Since it's not a flag, assume it's a PermissionCondition and try-catch to skip failures\\n try\\n IPermissionCondition(accessFlagOrCondition).isGranted(\\n _where,\\n _who,\\n _permissionId,\\n _data\\n )\\n returns (bool allowed) {\\n if (allowed) return true;\\n } catch {}\\n\\n return false;\\n }\\n\\n /// @notice A private function to be used to check permissions on the permission manager contract (`address(this)`) itself.\\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\\n function _auth(bytes32 _permissionId) internal view virtual {\\n if (!isGranted(address(this), msg.sender, _permissionId, msg.data)) {\\n revert Unauthorized({\\n where: address(this),\\n who: msg.sender,\\n permissionId: _permissionId\\n });\\n }\\n }\\n\\n /// @notice Generates the hash for the `permissionsHashed` mapping obtained from the word \\\"PERMISSION\\\", the contract address, the address owning the permission, and the permission identifier.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @return The permission hash.\\n function permissionHash(\\n address _where,\\n address _who,\\n bytes32 _permissionId\\n ) internal pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"PERMISSION\\\", _who, _where, _permissionId));\\n }\\n\\n /// @notice Decides if the granting permissionId is restricted when `_who == ANY_ADDR` or `_where == ANY_ADDR`.\\n /// @param _permissionId The permission identifier.\\n /// @return Whether or not the permission is restricted.\\n /// @dev By default, every permission is unrestricted and it is the derived contract's responsibility to override it. Note, that the `ROOT_PERMISSION_ID` is included and not required to be set it again.\\n function isPermissionRestrictedForAnyAddr(\\n bytes32 _permissionId\\n ) internal view virtual returns (bool) {\\n (_permissionId); // silence the warning.\\n return false;\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x7ca7d6598c32f07ab1ee5c7b03086d14871db06a1a3dff65bc574e43d65433db\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/IPlugin.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IPlugin\\n/// @author Aragon Association - 2022-2023\\n/// @notice An interface defining the traits of a plugin.\\ninterface IPlugin {\\n enum PluginType {\\n UUPS,\\n Cloneable,\\n Constructable\\n }\\n\\n /// @notice Returns the plugin's type\\n function pluginType() external view returns (PluginType);\\n}\\n\",\"keccak256\":\"0xcdb72c04ca35478e4d786fbbe12cf0e6de7d76aa0510028432312697f42c7355\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {UUPSUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport {IERC1822ProxiableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"../dao/IDAO.sol\\\";\\nimport {DaoAuthorizableUpgradeable} from \\\"./dao-authorizable/DaoAuthorizableUpgradeable.sol\\\";\\nimport {IPlugin} from \\\"./IPlugin.sol\\\";\\n\\n/// @title PluginUUPSUpgradeable\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract, upgradeable contract to inherit from when creating a plugin being deployed via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\nabstract contract PluginUUPSUpgradeable is\\n IPlugin,\\n ERC165Upgradeable,\\n UUPSUpgradeable,\\n DaoAuthorizableUpgradeable\\n{\\n // NOTE: When adding new state variables to the contract, the size of `_gap` has to be adapted below as well.\\n\\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @inheritdoc IPlugin\\n function pluginType() public pure override returns (PluginType) {\\n return PluginType.UUPS;\\n }\\n\\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\\n bytes32 public constant UPGRADE_PLUGIN_PERMISSION_ID = keccak256(\\\"UPGRADE_PLUGIN_PERMISSION\\\");\\n\\n /// @notice Initializes the plugin by storing the associated DAO.\\n /// @param _dao The DAO contract.\\n function __PluginUUPSUpgradeable_init(IDAO _dao) internal virtual onlyInitializing {\\n __DaoAuthorizableUpgradeable_init(_dao);\\n }\\n\\n /// @notice Checks if an interface is supported by this or its parent contract.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPlugin).interfaceId ||\\n _interfaceId == type(IERC1822ProxiableUpgradeable).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @notice Returns the address of the implementation contract in the [proxy storage slot](https://eips.ethereum.org/EIPS/eip-1967) slot the [UUPS proxy](https://eips.ethereum.org/EIPS/eip-1822) is pointing to.\\n /// @return The address of the implementation contract.\\n function implementation() public view returns (address) {\\n return _getImplementation();\\n }\\n\\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n /// @dev The caller must have the `UPGRADE_PLUGIN_PERMISSION_ID` permission.\\n function _authorizeUpgrade(\\n address\\n ) internal virtual override auth(UPGRADE_PLUGIN_PERMISSION_ID) {}\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5b12df9d646c59629dbaeb0a70df476a867a82887f5ef7d8b35697c01fcb45f3\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ContextUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"../../dao/IDAO.sol\\\";\\nimport {_auth} from \\\"../../utils/auth.sol\\\";\\n\\n/// @title DaoAuthorizableUpgradeable\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract contract providing a meta-transaction compatible modifier for upgradeable or cloneable contracts to authorize function calls through an associated DAO.\\n/// @dev Make sure to call `__DaoAuthorizableUpgradeable_init` during initialization of the inheriting contract.\\nabstract contract DaoAuthorizableUpgradeable is ContextUpgradeable {\\n /// @notice The associated DAO managing the permissions of inheriting contracts.\\n IDAO private dao_;\\n\\n /// @notice Initializes the contract by setting the associated DAO.\\n /// @param _dao The associated DAO address.\\n function __DaoAuthorizableUpgradeable_init(IDAO _dao) internal onlyInitializing {\\n dao_ = _dao;\\n }\\n\\n /// @notice Returns the DAO contract.\\n /// @return The DAO contract.\\n function dao() public view returns (IDAO) {\\n return dao_;\\n }\\n\\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through the associated DAO's permission manager.\\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\\n modifier auth(bytes32 _permissionId) {\\n _auth(dao_, address(this), _msgSender(), _permissionId, _msgData());\\n _;\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xd21dcde806070ad8f62acc81d986e517edb5a60ebdff8419660763018f7895e8\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/utils/BitMap.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\n/// @param bitmap The `uint256` representation of bits.\\n/// @param index The index number to check whether 1 or 0 is set.\\n/// @return Returns `true` if the bit is set at `index` on `bitmap`.\\nfunction hasBit(uint256 bitmap, uint8 index) pure returns (bool) {\\n uint256 bitValue = bitmap & (1 << index);\\n return bitValue > 0;\\n}\\n\\n/// @param bitmap The `uint256` representation of bits.\\n/// @param index The index number to set the bit.\\n/// @return Returns a new number in which the bit is set at `index`.\\nfunction flipBit(uint256 bitmap, uint8 index) pure returns (uint256) {\\n return bitmap ^ (1 << index);\\n}\\n\",\"keccak256\":\"0x6a2eb612d06f0db7ebe43691966f16556ad0ec0ae54831b75c2b64e308626e8e\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/utils/CallbackHandler.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\n/// @title CallbackHandler\\n/// @author Aragon Association - 2022-2023\\n/// @notice This contract handles callbacks by registering a magic number together with the callback function's selector. It provides the `_handleCallback` function that inheriting contracts have to call inside their `fallback()` function (`_handleCallback(msg.callbackSelector, msg.data)`). This allows to adaptively register ERC standards (e.g., [ERC-721](https://eips.ethereum.org/EIPS/eip-721), [ERC-1115](https://eips.ethereum.org/EIPS/eip-1155), or future versions of [ERC-165](https://eips.ethereum.org/EIPS/eip-165)) and returning the required magic numbers for the associated callback functions for the inheriting contract so that it doesn't need to be upgraded.\\n/// @dev This callback handling functionality is intented to be used by executor contracts (i.e., `DAO.sol`).\\nabstract contract CallbackHandler {\\n /// @notice A mapping between callback function selectors and magic return numbers.\\n mapping(bytes4 => bytes4) internal callbackMagicNumbers;\\n\\n /// @notice The magic number refering to unregistered callbacks.\\n bytes4 internal constant UNREGISTERED_CALLBACK = bytes4(0);\\n\\n /// @notice Thrown if the callback function is not registered.\\n /// @param callbackSelector The selector of the callback function.\\n /// @param magicNumber The magic number to be registered for the callback function selector.\\n error UnkownCallback(bytes4 callbackSelector, bytes4 magicNumber);\\n\\n /// @notice Emitted when `_handleCallback` is called.\\n /// @param sender Who called the callback.\\n /// @param sig The function signature.\\n /// @param data The calldata.\\n event CallbackReceived(address sender, bytes4 indexed sig, bytes data);\\n\\n /// @notice Handles callbacks to adaptively support ERC standards.\\n /// @dev This function is supposed to be called via `_handleCallback(msg.sig, msg.data)` in the `fallback()` function of the inheriting contract.\\n /// @param _callbackSelector The function selector of the callback function.\\n /// @param _data The calldata.\\n /// @return The magic number registered for the function selector triggering the fallback.\\n function _handleCallback(\\n bytes4 _callbackSelector,\\n bytes memory _data\\n ) internal virtual returns (bytes4) {\\n bytes4 magicNumber = callbackMagicNumbers[_callbackSelector];\\n if (magicNumber == UNREGISTERED_CALLBACK) {\\n revert UnkownCallback({callbackSelector: _callbackSelector, magicNumber: magicNumber});\\n }\\n\\n emit CallbackReceived({sender: msg.sender, sig: _callbackSelector, data: _data});\\n\\n return magicNumber;\\n }\\n\\n /// @notice Registers a magic number for a callback function selector.\\n /// @param _callbackSelector The selector of the callback function.\\n /// @param _magicNumber The magic number to be registered for the callback function selector.\\n function _registerCallback(bytes4 _callbackSelector, bytes4 _magicNumber) internal virtual {\\n callbackMagicNumbers[_callbackSelector] = _magicNumber;\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xeee37200b791d81fa46f614a49ad5b10acc9f9b4bef90e1984d0f374f70fa6ed\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/utils/auth.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {IDAO} from \\\"../dao/IDAO.sol\\\";\\n\\n/// @notice Thrown if a call is unauthorized in the associated DAO.\\n/// @param dao The associated DAO.\\n/// @param where The context in which the authorization reverted.\\n/// @param who The address (EOA or contract) missing the permission.\\n/// @param permissionId The permission identifier.\\nerror DaoUnauthorized(address dao, address where, address who, bytes32 permissionId);\\n\\n/// @notice A free function checking if a caller is granted permissions on a target contract via a permission identifier that redirects the approval to a `PermissionCondition` if this was specified in the setup.\\n/// @param _where The address of the target contract for which `who` receives permission.\\n/// @param _who The address (EOA or contract) owning the permission.\\n/// @param _permissionId The permission identifier.\\n/// @param _data The optional data passed to the `PermissionCondition` registered.\\nfunction _auth(\\n IDAO _dao,\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes calldata _data\\n) view {\\n if (!_dao.hasPermission(_where, _who, _permissionId, _data))\\n revert DaoUnauthorized({\\n dao: address(_dao),\\n where: _where,\\n who: _who,\\n permissionId: _permissionId\\n });\\n}\\n\",\"keccak256\":\"0x1c9cf22583c8b5a08c6d2c02a68d9f05e58900a9bb27efa3b30abca2ecfabfe4\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/framework/plugin/setup/IPluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {PermissionLib} from \\\"../../../core/permission/PermissionLib.sol\\\";\\nimport {IDAO} from \\\"../../../core/dao/IDAO.sol\\\";\\n\\n/// @title IPluginSetup\\n/// @author Aragon Association - 2022-2023\\n/// @notice The interface required for a plugin setup contract to be consumed by the `PluginSetupProcessor` for plugin installations, updates, and uninstallations.\\ninterface IPluginSetup {\\n /// @notice The data associated with a prepared setup.\\n /// @param helpers The address array of helpers (contracts or EOAs) associated with this plugin version after the installation or update.\\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the installing or updating DAO.\\n struct PreparedSetupData {\\n address[] helpers;\\n PermissionLib.MultiTargetPermission[] permissions;\\n }\\n\\n /// @notice The payload for plugin updates and uninstallations containing the existing contracts as well as optional data to be consumed by the plugin setup.\\n /// @param plugin The address of the `Plugin`.\\n /// @param currentHelpers The address array of all current helpers (contracts or EOAs) associated with the plugin to update from.\\n /// @param data The bytes-encoded data containing the input parameters for the preparation of update/uninstall as specified in the corresponding ABI on the version's metadata.\\n struct SetupPayload {\\n address plugin;\\n address[] currentHelpers;\\n bytes data;\\n }\\n\\n /// @notice Prepares the installation of a plugin.\\n /// @param _dao The address of the installing DAO.\\n /// @param _data The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\\n /// @return plugin The address of the `Plugin` contract being prepared for installation.\\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\\n function prepareInstallation(\\n address _dao,\\n bytes calldata _data\\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData);\\n\\n /// @notice Prepares the update of a plugin.\\n /// @param _dao The address of the updating DAO.\\n /// @param _currentBuild The build number of the plugin to update from.\\n /// @param _payload The relevant data necessary for the `prepareUpdate`. See above.\\n /// @return initData The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\\n function prepareUpdate(\\n address _dao,\\n uint16 _currentBuild,\\n SetupPayload calldata _payload\\n ) external returns (bytes memory initData, PreparedSetupData memory preparedSetupData);\\n\\n /// @notice Prepares the uninstallation of a plugin.\\n /// @param _dao The address of the uninstalling DAO.\\n /// @param _payload The relevant data necessary for the `prepareUninstallation`. See above.\\n /// @return permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\\n function prepareUninstallation(\\n address _dao,\\n SetupPayload calldata _payload\\n ) external returns (PermissionLib.MultiTargetPermission[] memory permissions);\\n\\n /// @notice Returns the plugin implementation address.\\n /// @return The address of the plugin implementation contract.\\n /// @dev The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x81d1e60154e672372318f6fccf337b6094bb8fe1192e2f755b8cc0d645ff5332\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/framework/plugin/setup/PluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ERC165} from \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {ERC165Checker} from \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\nimport {Clones} from \\\"@openzeppelin/contracts/proxy/Clones.sol\\\";\\n\\nimport {PermissionLib} from \\\"../../../core/permission/PermissionLib.sol\\\";\\nimport {createERC1967Proxy as createERC1967} from \\\"../../../utils/Proxy.sol\\\";\\nimport {IPluginSetup} from \\\"./IPluginSetup.sol\\\";\\n\\n/// @title PluginSetup\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract contract that developers have to inherit from to write the setup of a plugin.\\nabstract contract PluginSetup is ERC165, IPluginSetup {\\n /// @inheritdoc IPluginSetup\\n function prepareUpdate(\\n address _dao,\\n uint16 _currentBuild,\\n SetupPayload calldata _payload\\n )\\n external\\n virtual\\n override\\n returns (bytes memory initData, PreparedSetupData memory preparedSetupData)\\n {}\\n\\n /// @notice A convenience function to create an [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract pointing to an implementation and being associated to a DAO.\\n /// @param _implementation The address of the implementation contract to which the proxy is pointing to.\\n /// @param _data The data to initialize the storage of the proxy contract.\\n /// @return The address of the created proxy contract.\\n function createERC1967Proxy(\\n address _implementation,\\n bytes memory _data\\n ) internal returns (address) {\\n return createERC1967(_implementation, _data);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPluginSetup).interfaceId || super.supportsInterface(_interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x04ff3ec8a5b121ef3972dbb8140b7cf313f9ed514f8471841e3dcf5304ef6950\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/plugins/utils/Addresslist.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {CheckpointsUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/CheckpointsUpgradeable.sol\\\";\\n\\nimport {_uncheckedAdd, _uncheckedSub} from \\\"../../utils/UncheckedMath.sol\\\";\\n\\n/// @title Addresslist\\n/// @author Aragon Association - 2021-2023\\n/// @notice The majority voting implementation using a list of member addresses.\\n/// @dev This contract inherits from `MajorityVotingBase` and implements the `IMajorityVoting` interface.\\nabstract contract Addresslist {\\n using CheckpointsUpgradeable for CheckpointsUpgradeable.History;\\n\\n /// @notice The mapping containing the checkpointed history of the address list.\\n mapping(address => CheckpointsUpgradeable.History) private _addresslistCheckpoints;\\n\\n /// @notice The checkpointed history of the length of the address list.\\n CheckpointsUpgradeable.History private _addresslistLengthCheckpoints;\\n\\n /// @notice Thrown when the address list update is invalid, which can be caused by the addition of an existing member or removal of a non-existing member.\\n /// @param member The array of member addresses to be added or removed.\\n error InvalidAddresslistUpdate(address member);\\n\\n /// @notice Checks if an account is on the address list at a specific block number.\\n /// @param _account The account address being checked.\\n /// @param _blockNumber The block number.\\n /// @return Whether the account is listed at the specified block number.\\n function isListedAtBlock(\\n address _account,\\n uint256 _blockNumber\\n ) public view virtual returns (bool) {\\n return _addresslistCheckpoints[_account].getAtBlock(_blockNumber) == 1;\\n }\\n\\n /// @notice Checks if an account is currently on the address list.\\n /// @param _account The account address being checked.\\n /// @return Whether the account is currently listed.\\n function isListed(address _account) public view virtual returns (bool) {\\n return _addresslistCheckpoints[_account].latest() == 1;\\n }\\n\\n /// @notice Returns the length of the address list at a specific block number.\\n /// @param _blockNumber The specific block to get the count from. If `0`, then the latest checkpoint value is returned.\\n /// @return The address list length at the specified block number.\\n function addresslistLengthAtBlock(uint256 _blockNumber) public view virtual returns (uint256) {\\n return _addresslistLengthCheckpoints.getAtBlock(_blockNumber);\\n }\\n\\n /// @notice Returns the current length of the address list.\\n /// @return The current address list length.\\n function addresslistLength() public view virtual returns (uint256) {\\n return _addresslistLengthCheckpoints.latest();\\n }\\n\\n /// @notice Internal function to add new addresses to the address list.\\n /// @param _newAddresses The new addresses to be added.\\n function _addAddresses(address[] calldata _newAddresses) internal virtual {\\n for (uint256 i; i < _newAddresses.length; ) {\\n if (isListed(_newAddresses[i])) {\\n revert InvalidAddresslistUpdate(_newAddresses[i]);\\n }\\n\\n // Mark the address as listed\\n _addresslistCheckpoints[_newAddresses[i]].push(1);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n _addresslistLengthCheckpoints.push(_uncheckedAdd, _newAddresses.length);\\n }\\n\\n /// @notice Internal function to remove existing addresses from the address list.\\n /// @param _exitingAddresses The existing addresses to be removed.\\n function _removeAddresses(address[] calldata _exitingAddresses) internal virtual {\\n for (uint256 i; i < _exitingAddresses.length; ) {\\n if (!isListed(_exitingAddresses[i])) {\\n revert InvalidAddresslistUpdate(_exitingAddresses[i]);\\n }\\n\\n // Mark the address as not listed\\n _addresslistCheckpoints[_exitingAddresses[i]].push(0);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n _addresslistLengthCheckpoints.push(_uncheckedSub, _exitingAddresses.length);\\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 /// https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n uint256[48] private __gap;\\n}\\n\",\"keccak256\":\"0xd80d688df0b55e55406074a90c55be301edf73bcb68ad016db318d65bc05c868\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/plugins/utils/Ratio.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n// The base value to encode real-valued ratios on the interval `[0,1]` as integers on the interval `[0, 10**6]`.\\nuint256 constant RATIO_BASE = 10 ** 6;\\n\\n/// @notice Thrown if a ratio value exceeds the maximal value of `10**6`.\\n/// @param limit The maximal value.\\n/// @param actual The actual value.\\nerror RatioOutOfBounds(uint256 limit, uint256 actual);\\n\\n/// @notice Applies a ratio to a value and ceils the remainder.\\n/// @param _value The value to which the ratio is applied.\\n/// @param _ratio The ratio that must be in the interval `[0, 10**6]`.\\n/// @return result The resulting value.\\nfunction _applyRatioCeiled(uint256 _value, uint256 _ratio) pure returns (uint256 result) {\\n if (_ratio > RATIO_BASE) {\\n revert RatioOutOfBounds({limit: RATIO_BASE, actual: _ratio});\\n }\\n\\n _value = _value * _ratio;\\n uint256 remainder = _value % RATIO_BASE;\\n result = _value / RATIO_BASE;\\n\\n // Check if ceiling is needed\\n if (remainder != 0) {\\n ++result;\\n }\\n}\\n\",\"keccak256\":\"0x9f7090abe53c6a3a2972e596efc483df082df5ae219e3cb5f039f6294bffdd81\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/token/ERC20/IERC20MintableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\n/// @title IERC20MintableUpgradeable\\n/// @notice Interface to allow minting of [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens.\\ninterface IERC20MintableUpgradeable {\\n /// @notice Mints [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens for a receiving address.\\n /// @param _to The receiving address.\\n /// @param _amount The amount of tokens.\\n function mint(address _to, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0x67c5e5b94e83984da5427057e3945f1863c5d2a6f35fddd6abc1a11927167a46\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/token/ERC20/governance/GovernanceERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {IERC20PermitUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {IERC20MetadataUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport {ERC20VotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {IVotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\\\";\\n\\nimport {DaoAuthorizableUpgradeable} from \\\"../../../core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\\\";\\nimport {IDAO} from \\\"../../../core/dao/IDAO.sol\\\";\\nimport {IERC20MintableUpgradeable} from \\\"../IERC20MintableUpgradeable.sol\\\";\\n\\n/// @title GovernanceERC20\\n/// @author Aragon Association\\n/// @notice An [OpenZeppelin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) compatible [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token that can be used for voting and is managed by a DAO.\\ncontract GovernanceERC20 is\\n IERC20MintableUpgradeable,\\n Initializable,\\n ERC165Upgradeable,\\n ERC20VotesUpgradeable,\\n DaoAuthorizableUpgradeable\\n{\\n /// @notice The permission identifier to mint new tokens\\n bytes32 public constant MINT_PERMISSION_ID = keccak256(\\\"MINT_PERMISSION\\\");\\n\\n /// @notice The settings for the initial mint of the token.\\n /// @param receivers The receivers of the tokens.\\n /// @param amounts The amounts of tokens to be minted for each receiver.\\n /// @dev The lengths of `receivers` and `amounts` must match.\\n struct MintSettings {\\n address[] receivers;\\n uint256[] amounts;\\n }\\n\\n /// @notice Thrown if the number of receivers and amounts specified in the mint settings do not match.\\n /// @param receiversArrayLength The length of the `receivers` array.\\n /// @param amountsArrayLength The length of the `amounts` array.\\n error MintSettingsArrayLengthMismatch(uint256 receiversArrayLength, uint256 amountsArrayLength);\\n\\n /// @notice Calls the initialize function.\\n /// @param _dao The managing DAO.\\n /// @param _name The name of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.\\n /// @param _symbol The symbol of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.\\n /// @param _mintSettings The token mint settings struct containing the `receivers` and `amounts`.\\n constructor(\\n IDAO _dao,\\n string memory _name,\\n string memory _symbol,\\n MintSettings memory _mintSettings\\n ) {\\n initialize(_dao, _name, _symbol, _mintSettings);\\n }\\n\\n /// @notice Initializes the contract and mints tokens to a list of receivers.\\n /// @param _dao The managing DAO.\\n /// @param _name The name of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.\\n /// @param _symbol The symbol of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.\\n /// @param _mintSettings The token mint settings struct containing the `receivers` and `amounts`.\\n function initialize(\\n IDAO _dao,\\n string memory _name,\\n string memory _symbol,\\n MintSettings memory _mintSettings\\n ) public initializer {\\n // Check mint settings\\n if (_mintSettings.receivers.length != _mintSettings.amounts.length) {\\n revert MintSettingsArrayLengthMismatch({\\n receiversArrayLength: _mintSettings.receivers.length,\\n amountsArrayLength: _mintSettings.amounts.length\\n });\\n }\\n\\n __ERC20_init(_name, _symbol);\\n __ERC20Permit_init(_name);\\n __DaoAuthorizableUpgradeable_init(_dao);\\n\\n for (uint256 i; i < _mintSettings.receivers.length; ) {\\n _mint(_mintSettings.receivers[i], _mintSettings.amounts[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IERC20Upgradeable).interfaceId ||\\n _interfaceId == type(IERC20PermitUpgradeable).interfaceId ||\\n _interfaceId == type(IERC20MetadataUpgradeable).interfaceId ||\\n _interfaceId == type(IVotesUpgradeable).interfaceId ||\\n _interfaceId == type(IERC20MintableUpgradeable).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @notice Mints tokens to an address.\\n /// @param to The address receiving the tokens.\\n /// @param amount The amount of tokens to be minted.\\n function mint(address to, uint256 amount) external override auth(MINT_PERMISSION_ID) {\\n _mint(to, amount);\\n }\\n\\n // https://forum.openzeppelin.com/t/self-delegation-in-erc20votes/17501/12?u=novaknole\\n /// @inheritdoc ERC20VotesUpgradeable\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal override {\\n super._afterTokenTransfer(from, to, amount);\\n\\n // Automatically turn on delegation on mint/transfer but only for the first time.\\n if (to != address(0) && numCheckpoints(to) == 0 && delegates(to) == address(0)) {\\n _delegate(to, to);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf47bd02799c8ac3d021b348f857e6cc22c7782d3c99c88e59d3cb94921261134\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/token/ERC20/governance/GovernanceWrappedERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {ERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport {ERC20WrapperUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol\\\";\\nimport {IVotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\\\";\\nimport {IERC20PermitUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {IERC20MetadataUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport {ERC20VotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\n\\nimport {DaoAuthorizableUpgradeable} from \\\"../../../core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\\\";\\nimport {IDAO} from \\\"../../../core/dao/IDAO.sol\\\";\\nimport {IGovernanceWrappedERC20} from \\\"./IGovernanceWrappedERC20.sol\\\";\\n\\n/// @title GovernanceWrappedERC20\\n/// @author Aragon Association\\n/// @notice Wraps an existing [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token by inheriting from `ERC20WrapperUpgradeable` and allows to use it for voting by inheriting from `ERC20VotesUpgradeable`. The latter is compatible with [OpenZeppelin's `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) interface.\\n/// The contract also supports meta transactions. To use an `amount` of underlying tokens for voting, the token owner has to\\n/// 1. call `approve` for the tokens to be used by this contract\\n/// 2. call `depositFor` to wrap them, which safely transfers the underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens to the contract and mints wrapped [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens.\\n/// To get the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens back, the owner of the wrapped tokens can call `withdrawFor`, which burns the wrapped [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens and safely transfers the underlying tokens back to the owner.\\n/// @dev This contract intentionally has no public mint functionality because this is the responsibility of the underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token contract.\\ncontract GovernanceWrappedERC20 is\\n IGovernanceWrappedERC20,\\n Initializable,\\n ERC165Upgradeable,\\n ERC20VotesUpgradeable,\\n ERC20WrapperUpgradeable\\n{\\n /// @notice Calls the initialize function.\\n /// @param _token The underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.\\n /// @param _name The name of the wrapped token.\\n /// @param _symbol The symbol of the wrapped token.\\n constructor(IERC20Upgradeable _token, string memory _name, string memory _symbol) {\\n initialize(_token, _name, _symbol);\\n }\\n\\n /// @notice Initializes the contract.\\n /// @param _token The underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.\\n /// @param _name The name of the wrapped token.\\n /// @param _symbol The symbol of the wrapped token.\\n function initialize(\\n IERC20Upgradeable _token,\\n string memory _name,\\n string memory _symbol\\n ) public initializer {\\n __ERC20_init(_name, _symbol);\\n __ERC20Permit_init(_name);\\n __ERC20Wrapper_init(_token);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IGovernanceWrappedERC20).interfaceId ||\\n _interfaceId == type(IERC20Upgradeable).interfaceId ||\\n _interfaceId == type(IERC20PermitUpgradeable).interfaceId ||\\n _interfaceId == type(IERC20MetadataUpgradeable).interfaceId ||\\n _interfaceId == type(IVotesUpgradeable).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @inheritdoc ERC20WrapperUpgradeable\\n /// @dev Uses the `decimals` of the underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.\\n function decimals()\\n public\\n view\\n override(ERC20Upgradeable, ERC20WrapperUpgradeable)\\n returns (uint8)\\n {\\n return ERC20WrapperUpgradeable.decimals();\\n }\\n\\n /// @inheritdoc IGovernanceWrappedERC20\\n function depositFor(\\n address account,\\n uint256 amount\\n ) public override(IGovernanceWrappedERC20, ERC20WrapperUpgradeable) returns (bool) {\\n return ERC20WrapperUpgradeable.depositFor(account, amount);\\n }\\n\\n /// @inheritdoc IGovernanceWrappedERC20\\n function withdrawTo(\\n address account,\\n uint256 amount\\n ) public override(IGovernanceWrappedERC20, ERC20WrapperUpgradeable) returns (bool) {\\n return ERC20WrapperUpgradeable.withdrawTo(account, amount);\\n }\\n\\n // https://forum.openzeppelin.com/t/self-delegation-in-erc20votes/17501/12?u=novaknole\\n /// @inheritdoc ERC20VotesUpgradeable\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override(ERC20VotesUpgradeable, ERC20Upgradeable) {\\n super._afterTokenTransfer(from, to, amount);\\n\\n // Automatically turn on delegation on mint/transfer but only for the first time.\\n if (to != address(0) && numCheckpoints(to) == 0 && delegates(to) == address(0)) {\\n _delegate(to, to);\\n }\\n }\\n\\n /// @inheritdoc ERC20VotesUpgradeable\\n function _mint(\\n address to,\\n uint256 amount\\n ) internal override(ERC20VotesUpgradeable, ERC20Upgradeable) {\\n super._mint(to, amount);\\n }\\n\\n /// @inheritdoc ERC20VotesUpgradeable\\n function _burn(\\n address account,\\n uint256 amount\\n ) internal override(ERC20VotesUpgradeable, ERC20Upgradeable) {\\n super._burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0xcb29f2737339e31aa9991a98e108c590df5eba6ed4edb88b1578595525abaf9b\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/token/ERC20/governance/IGovernanceWrappedERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {ERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport {ERC20WrapperUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol\\\";\\n\\ninterface IGovernanceWrappedERC20 {\\n /// @notice Deposits an amount of underlying token and mints the corresponding number of wrapped tokens for a receiving address.\\n /// @param account The address receiving the minted, wrapped tokens.\\n /// @param amount The amount of tokens to deposit.\\n function depositFor(address account, uint256 amount) external returns (bool);\\n\\n /// @notice Withdraws an amount of underlying tokens to a receiving address and burns the corresponding number of wrapped tokens.\\n /// @param account The address receiving the withdrawn, underlying tokens.\\n /// @param amount The amount of underlying tokens to withdraw.\\n function withdrawTo(address account, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x379383d14bc3f74effb585110ad2f13570374d6bd4e4e298fb6bb5213f37bba7\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/// @notice Free function to create a [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract based on the passed base contract address.\\n/// @param _logic The base contract address.\\n/// @param _data The constructor arguments for this contract.\\n/// @return The address of the proxy contract created.\\n/// @dev Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, it\\u2019s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see [OpenZeppelin ERC1967Proxy-constructor](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy-constructor-address-bytes-)).\\nfunction createERC1967Proxy(address _logic, bytes memory _data) returns (address) {\\n return address(new ERC1967Proxy(_logic, _data));\\n}\\n\",\"keccak256\":\"0x9d871292dfac2f42957e4d10eec56fd74dda0bd7803c01e849d2e9f5e2799fff\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/UncheckedMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @notice Increments an unsigned integer by one without checking the result for overflow errors (using safe math).\\n/// @param i The number to be incremented.\\n/// @return The number incremented by one.\\nfunction _uncheckedIncrement(uint256 i) pure returns (uint256) {\\n unchecked {\\n ++i;\\n }\\n return i;\\n}\\n\\n/// @notice Adds two unsigned integers without checking the result for overflow errors (using safe math).\\n/// @param a The first summand.\\n/// @param b The second summand.\\n/// @return The sum.\\nfunction _uncheckedAdd(uint256 a, uint256 b) pure returns (uint256) {\\n unchecked {\\n return a + b;\\n }\\n}\\n\\n/// @notice Subtracts two unsigned integers without checking the result for overflow errors (using safe math).\\n/// @param a The minuend.\\n/// @param b The subtrahend.\\n/// @return The difference.\\nfunction _uncheckedSub(uint256 a, uint256 b) pure returns (uint256) {\\n unchecked {\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x69f00ee97ef1bd5ae895602a02650a56a97eddd716e63a729f446f9bffdebf85\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/protocol/IProtocolVersion.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IProtocolVersion\\n/// @author Aragon Association - 2022-2023\\n/// @notice An interface defining the semantic OSx protocol version.\\ninterface IProtocolVersion {\\n /// @notice Returns the protocol version at which the current contract was built. Use it to check for future upgrades that might be applicable.\\n /// @return _version Returns the semantic OSx protocol version.\\n function protocolVersion() external view returns (uint8[3] memory _version);\\n}\\n\",\"keccak256\":\"0xd356df9b42e6ed5be9cae21d31d0d3c62460831ed28d9c342d85f3c18eb0437d\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/protocol/ProtocolVersion.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {IProtocolVersion} from \\\"./IProtocolVersion.sol\\\";\\n\\n/// @title ProtocolVersion\\n/// @author Aragon Association - 2023\\n/// @notice An abstract, stateless, non-upgradeable contract serves as a base for other contracts requiring awareness of the OSx protocol version.\\n/// @dev Do not add any new variables to this contract that would shift down storage in the inheritance chain.\\nabstract contract ProtocolVersion is IProtocolVersion {\\n // IMPORTANT: Do not add any storage variable, see the above notice.\\n\\n /// @inheritdoc IProtocolVersion\\n function protocolVersion() public pure returns (uint8[3] memory) {\\n return [1, 3, 0];\\n }\\n}\\n\",\"keccak256\":\"0x08399a097c107c0ab6f8733e40af26318498117d3a20e815e973602842b36671\",\"license\":\"AGPL-3.0-or-later\"},\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol)\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.\\n *\\n * _Available since v4.5._\\n */\\ninterface IVotesUpgradeable {\\n /**\\n * @dev Emitted when an account changes their delegate.\\n */\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n\\n /**\\n * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.\\n */\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /**\\n * @dev Returns the current amount of votes that `account` has.\\n */\\n function getVotes(address account) external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is\\n * configured to use block numbers, this will return the value at the end of the corresponding block.\\n */\\n function getPastVotes(address account, uint256 timepoint) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is\\n * configured to use block numbers, this will return the value at the end of the corresponding block.\\n *\\n * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.\\n * Votes that have not been delegated are still part of total supply, even though they would not participate in a\\n * vote.\\n */\\n function getPastTotalSupply(uint256 timepoint) external view returns (uint256);\\n\\n /**\\n * @dev Returns the delegate that `account` has chosen.\\n */\\n function delegates(address account) external view returns (address);\\n\\n /**\\n * @dev Delegates votes from the sender to `delegatee`.\\n */\\n function delegate(address delegatee) external;\\n\\n /**\\n * @dev Delegates votes from signer to `delegatee`.\\n */\\n function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external;\\n}\\n\",\"keccak256\":\"0x2d600bbef9320309cd2a86c1d087eb9d6dbcc00430713ee54bbc5c5a2a11ba31\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967Upgradeable {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x47d6e06872b12e72c79d1b5eb55842f860b5fb1207b2317c2358d2766b950a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC5267Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)\\n\\npragma solidity ^0.8.0;\\n\\ninterface IERC5267Upgradeable {\\n /**\\n * @dev MAY be emitted to signal that the domain could have changed.\\n */\\n event EIP712DomainChanged();\\n\\n /**\\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\\n * signature.\\n */\\n function eip712Domain()\\n external\\n view\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n );\\n}\\n\",\"keccak256\":\"0xe562dab443278837fa50faddb76743399e942181881db8dccaea3bd1712994db\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC5805Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../governance/utils/IVotesUpgradeable.sol\\\";\\nimport \\\"./IERC6372Upgradeable.sol\\\";\\n\\ninterface IERC5805Upgradeable is IERC6372Upgradeable, IVotesUpgradeable {}\\n\",\"keccak256\":\"0x19848eec9045c8b91f1ab6b1853966443e3e36bcbc307593ed37a9f0df179d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC6372Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol)\\n\\npragma solidity ^0.8.0;\\n\\ninterface IERC6372Upgradeable {\\n /**\\n * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).\\n */\\n function clock() external view returns (uint48);\\n\\n /**\\n * @dev Description of the clock\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function CLOCK_MODE() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x3026befd6d69d1b46960bdc35a2ad37c0e1352f26983ee3728dd61fd32aa308a\",\"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.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC1967Upgradeable.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 */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {\\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 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(address newImplementation, bytes memory data, bool forceCall) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n AddressUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) 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 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 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(address newBeacon, bytes memory data, bool forceCall) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\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[50] private __gap;\\n}\\n\",\"keccak256\":\"0x584ebdf9c1118a7c773f98788e3f3ede01982bdf8932aa06f5acc7d54876e161\",\"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.9.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 * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\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 Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\\n */\\n function upgradeTo(address newImplementation) public 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 * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public 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\":\"0xb607cb94c27e89750f5ae2ccebcb94e654e926f6125f4fd4c6262c89875118ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\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)\\\"))` if transfer is allowed\\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 * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\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)\\\"))` if transfer is allowed\\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\",\"keccak256\":\"0xffcb29612efb57efc8f0d4897deb5abaeac830022c59a3aa17446d698dbc856b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xf51f292659a77777c0ed7375a39683d8bee53b86a6e7bd0c76f34ce7aa37a3a8\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\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 * 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 default value returned by this function, unless\\n * it's 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev 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(address owner, address spender, uint256 amount) 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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\":\"0xd14a627157b9a411d2410713e5dd3a377e9064bd5c194a90748bbf27ea625784\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x0e1f0f5f62f67a881cd1a9597acbc0a5e4071f3c2c10449a183b922ae7272e3f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./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\":\"0x3988ac03e4819acd4b5adf41de7d43c1471748ddc2d73d2c7aca1e3827402e5d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../interfaces/IERC5805Upgradeable.sol\\\";\\nimport \\\"../../../utils/math/MathUpgradeable.sol\\\";\\nimport \\\"../../../utils/math/SafeCastUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,\\n * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.\\n *\\n * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.\\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 {getVotes} and {getPastVotes}.\\n *\\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\\n *\\n * _Available since v4.2._\\n */\\nabstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable, IERC5805Upgradeable {\\n function __ERC20Votes_init() internal onlyInitializing {\\n }\\n\\n function __ERC20Votes_init_unchained() internal onlyInitializing {\\n }\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint224 votes;\\n }\\n\\n bytes32 private constant _DELEGATION_TYPEHASH =\\n keccak256(\\\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\\\");\\n\\n mapping(address => address) private _delegates;\\n mapping(address => Checkpoint[]) private _checkpoints;\\n Checkpoint[] private _totalSupplyCheckpoints;\\n\\n /**\\n * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).\\n */\\n function clock() public view virtual override returns (uint48) {\\n return SafeCastUpgradeable.toUint48(block.number);\\n }\\n\\n /**\\n * @dev Description of the clock\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function CLOCK_MODE() public view virtual override returns (string memory) {\\n // Check that the clock was not modified\\n require(clock() == block.number, \\\"ERC20Votes: broken clock mode\\\");\\n return \\\"mode=blocknumber&from=default\\\";\\n }\\n\\n /**\\n * @dev Get the `pos`-th checkpoint for `account`.\\n */\\n function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {\\n return _checkpoints[account][pos];\\n }\\n\\n /**\\n * @dev Get number of checkpoints for `account`.\\n */\\n function numCheckpoints(address account) public view virtual returns (uint32) {\\n return SafeCastUpgradeable.toUint32(_checkpoints[account].length);\\n }\\n\\n /**\\n * @dev Get the address `account` is currently delegating to.\\n */\\n function delegates(address account) public view virtual override returns (address) {\\n return _delegates[account];\\n }\\n\\n /**\\n * @dev Gets the current votes balance for `account`\\n */\\n function getVotes(address account) public view virtual override returns (uint256) {\\n uint256 pos = _checkpoints[account].length;\\n unchecked {\\n return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\\n }\\n }\\n\\n /**\\n * @dev Retrieve the number of votes for `account` at the end of `timepoint`.\\n *\\n * Requirements:\\n *\\n * - `timepoint` must be in the past\\n */\\n function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) {\\n require(timepoint < clock(), \\\"ERC20Votes: future lookup\\\");\\n return _checkpointsLookup(_checkpoints[account], timepoint);\\n }\\n\\n /**\\n * @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances.\\n * It is NOT the sum of all the delegated votes!\\n *\\n * Requirements:\\n *\\n * - `timepoint` must be in the past\\n */\\n function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) {\\n require(timepoint < clock(), \\\"ERC20Votes: future lookup\\\");\\n return _checkpointsLookup(_totalSupplyCheckpoints, timepoint);\\n }\\n\\n /**\\n * @dev Lookup a value in a list of (sorted) checkpoints.\\n */\\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 timepoint) private view returns (uint256) {\\n // We run a binary search to look for the last (most recent) checkpoint taken before (or at) `timepoint`.\\n //\\n // Initially we check if the block is recent to narrow the search range.\\n // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).\\n // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.\\n // - If the middle checkpoint is after `timepoint`, we look in [low, mid)\\n // - If the middle checkpoint is before or equal to `timepoint`, we look in [mid+1, high)\\n // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not\\n // out of bounds (in which case we're looking too far in the past and the result is 0).\\n // Note that if the latest checkpoint available is exactly for `timepoint`, we end up with an index that is\\n // past the end of the array, so we technically don't find a checkpoint after `timepoint`, but it works out\\n // the same.\\n uint256 length = ckpts.length;\\n\\n uint256 low = 0;\\n uint256 high = length;\\n\\n if (length > 5) {\\n uint256 mid = length - MathUpgradeable.sqrt(length);\\n if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n unchecked {\\n return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes;\\n }\\n }\\n\\n /**\\n * @dev Delegate votes from the sender to `delegatee`.\\n */\\n function delegate(address delegatee) public virtual override {\\n _delegate(_msgSender(), delegatee);\\n }\\n\\n /**\\n * @dev Delegates votes from signer to `delegatee`\\n */\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n address signer = ECDSAUpgradeable.recover(\\n _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\\n v,\\n r,\\n s\\n );\\n require(nonce == _useNonce(signer), \\\"ERC20Votes: invalid nonce\\\");\\n _delegate(signer, delegatee);\\n }\\n\\n /**\\n * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).\\n */\\n function _maxSupply() internal view virtual returns (uint224) {\\n return type(uint224).max;\\n }\\n\\n /**\\n * @dev Snapshots the totalSupply after it has been increased.\\n */\\n function _mint(address account, uint256 amount) internal virtual override {\\n super._mint(account, amount);\\n require(totalSupply() <= _maxSupply(), \\\"ERC20Votes: total supply risks overflowing votes\\\");\\n\\n _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);\\n }\\n\\n /**\\n * @dev Snapshots the totalSupply after it has been decreased.\\n */\\n function _burn(address account, uint256 amount) internal virtual override {\\n super._burn(account, amount);\\n\\n _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);\\n }\\n\\n /**\\n * @dev Move voting power when tokens are transferred.\\n *\\n * Emits a {IVotes-DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual override {\\n super._afterTokenTransfer(from, to, amount);\\n\\n _moveVotingPower(delegates(from), delegates(to), amount);\\n }\\n\\n /**\\n * @dev Change delegation for `delegator` to `delegatee`.\\n *\\n * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}.\\n */\\n function _delegate(address delegator, address delegatee) internal virtual {\\n address currentDelegate = delegates(delegator);\\n uint256 delegatorBalance = balanceOf(delegator);\\n _delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveVotingPower(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _moveVotingPower(address src, address dst, uint256 amount) private {\\n if (src != dst && amount > 0) {\\n if (src != address(0)) {\\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);\\n emit DelegateVotesChanged(src, oldWeight, newWeight);\\n }\\n\\n if (dst != address(0)) {\\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);\\n emit DelegateVotesChanged(dst, oldWeight, newWeight);\\n }\\n }\\n }\\n\\n function _writeCheckpoint(\\n Checkpoint[] storage ckpts,\\n function(uint256, uint256) view returns (uint256) op,\\n uint256 delta\\n ) private returns (uint256 oldWeight, uint256 newWeight) {\\n uint256 pos = ckpts.length;\\n\\n unchecked {\\n Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1);\\n\\n oldWeight = oldCkpt.votes;\\n newWeight = op(oldWeight, delta);\\n\\n if (pos > 0 && oldCkpt.fromBlock == clock()) {\\n _unsafeAccess(ckpts, pos - 1).votes = SafeCastUpgradeable.toUint224(newWeight);\\n } else {\\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(clock()), votes: SafeCastUpgradeable.toUint224(newWeight)}));\\n }\\n }\\n }\\n\\n function _add(uint256 a, uint256 b) private pure returns (uint256) {\\n return a + b;\\n }\\n\\n function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.\\n */\\n function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) {\\n assembly {\\n mstore(0, ckpts.slot)\\n result.slot := add(keccak256(0, 0x20), pos)\\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[47] private __gap;\\n}\\n\",\"keccak256\":\"0x435286e01fcfb0bed104e44b9bf9d8abfe9f7b0a8f576e5bbef5eb91fe55e1d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Wrapper.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../utils/SafeERC20Upgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of the ERC20 token contract to support token wrapping.\\n *\\n * Users can deposit and withdraw \\\"underlying tokens\\\" and receive a matching number of \\\"wrapped tokens\\\". This is useful\\n * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the\\n * wrapping of an existing \\\"basic\\\" ERC20 into a governance token.\\n *\\n * _Available since v4.2._\\n *\\n * @custom:storage-size 51\\n */\\nabstract contract ERC20WrapperUpgradeable is Initializable, ERC20Upgradeable {\\n IERC20Upgradeable private _underlying;\\n\\n function __ERC20Wrapper_init(IERC20Upgradeable underlyingToken) internal onlyInitializing {\\n __ERC20Wrapper_init_unchained(underlyingToken);\\n }\\n\\n function __ERC20Wrapper_init_unchained(IERC20Upgradeable underlyingToken) internal onlyInitializing {\\n require(underlyingToken != this, \\\"ERC20Wrapper: cannot self wrap\\\");\\n _underlying = underlyingToken;\\n }\\n\\n /**\\n * @dev See {ERC20-decimals}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n try IERC20MetadataUpgradeable(address(_underlying)).decimals() returns (uint8 value) {\\n return value;\\n } catch {\\n return super.decimals();\\n }\\n }\\n\\n /**\\n * @dev Returns the address of the underlying ERC-20 token that is being wrapped.\\n */\\n function underlying() public view returns (IERC20Upgradeable) {\\n return _underlying;\\n }\\n\\n /**\\n * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens.\\n */\\n function depositFor(address account, uint256 amount) public virtual returns (bool) {\\n address sender = _msgSender();\\n require(sender != address(this), \\\"ERC20Wrapper: wrapper can't deposit\\\");\\n SafeERC20Upgradeable.safeTransferFrom(_underlying, sender, address(this), amount);\\n _mint(account, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens.\\n */\\n function withdrawTo(address account, uint256 amount) public virtual returns (bool) {\\n _burn(_msgSender(), amount);\\n SafeERC20Upgradeable.safeTransfer(_underlying, account, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake. Internal\\n * function that can be exposed with access control if desired.\\n */\\n function _recover(address account) internal virtual returns (uint256) {\\n uint256 value = _underlying.balanceOf(address(this)) - totalSupply();\\n _mint(account, value);\\n return value;\\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\":\"0x14bb62a60fcbc911c33ac0e5456bf31ed50b502c30be46ee15bd3b698e91bd81\",\"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/IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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\":\"0xd60f939a3ca0199014d079b4dd66aa757954334947d81eb5c1d35d7a83061ab3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-2612 is Final as of 2022-11-01. This file is deprecated.\\n\\nimport \\\"./IERC20PermitUpgradeable.sol\\\";\\n\",\"keccak256\":\"0x5225f0310a2992589600ebddffd0dd512a61836bda672b46744b416765d7ac31\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20Upgradeable {\\n using AddressUpgradeable for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20PermitUpgradeable token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x23b997be73d3dd46885262704f0f8cfc7273fdadfe303d37969a9561373972b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721ReceiverUpgradeable {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xbb2ed8106d94aeae6858e2551a1e7174df73994b77b13ebd120ccaaef80155f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\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\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CheckpointsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Checkpoints.sol)\\n// This file was procedurally generated from scripts/generate/templates/Checkpoints.js.\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SafeCastUpgradeable.sol\\\";\\n\\n/**\\n * @dev This library defines the `History` struct, for checkpointing values as they change at different points in\\n * time, and later looking up past values by block number. See {Votes} as an example.\\n *\\n * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new\\n * checkpoint for the current transaction block using the {push} function.\\n *\\n * _Available since v4.5._\\n */\\nlibrary CheckpointsUpgradeable {\\n struct History {\\n Checkpoint[] _checkpoints;\\n }\\n\\n struct Checkpoint {\\n uint32 _blockNumber;\\n uint224 _value;\\n }\\n\\n /**\\n * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one\\n * before it is returned, or zero otherwise. Because the number returned corresponds to that at the end of the\\n * block, the requested block number must be in the past, excluding the current block.\\n */\\n function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) {\\n require(blockNumber < block.number, \\\"Checkpoints: block not yet mined\\\");\\n uint32 key = SafeCastUpgradeable.toUint32(blockNumber);\\n\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one\\n * before it is returned, or zero otherwise. Similar to {upperLookup} but optimized for the case when the searched\\n * checkpoint is probably \\\"recent\\\", defined as being among the last sqrt(N) checkpoints where N is the number of\\n * checkpoints.\\n */\\n function getAtProbablyRecentBlock(History storage self, uint256 blockNumber) internal view returns (uint256) {\\n require(blockNumber < block.number, \\\"Checkpoints: block not yet mined\\\");\\n uint32 key = SafeCastUpgradeable.toUint32(blockNumber);\\n\\n uint256 len = self._checkpoints.length;\\n\\n uint256 low = 0;\\n uint256 high = len;\\n\\n if (len > 5) {\\n uint256 mid = len - MathUpgradeable.sqrt(len);\\n if (key < _unsafeAccess(self._checkpoints, mid)._blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);\\n\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block.\\n *\\n * Returns previous value and new value.\\n */\\n function push(History storage self, uint256 value) internal returns (uint256, uint256) {\\n return _insert(self._checkpoints, SafeCastUpgradeable.toUint32(block.number), SafeCastUpgradeable.toUint224(value));\\n }\\n\\n /**\\n * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will\\n * be set to `op(latest, delta)`.\\n *\\n * Returns previous value and new value.\\n */\\n function push(\\n History storage self,\\n function(uint256, uint256) view returns (uint256) op,\\n uint256 delta\\n ) internal returns (uint256, uint256) {\\n return push(self, op(latest(self), delta));\\n }\\n\\n /**\\n * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.\\n */\\n function latest(History storage self) internal view returns (uint224) {\\n uint256 pos = self._checkpoints.length;\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value\\n * in the most recent checkpoint.\\n */\\n function latestCheckpoint(\\n History storage self\\n ) internal view returns (bool exists, uint32 _blockNumber, uint224 _value) {\\n uint256 pos = self._checkpoints.length;\\n if (pos == 0) {\\n return (false, 0, 0);\\n } else {\\n Checkpoint memory ckpt = _unsafeAccess(self._checkpoints, pos - 1);\\n return (true, ckpt._blockNumber, ckpt._value);\\n }\\n }\\n\\n /**\\n * @dev Returns the number of checkpoint.\\n */\\n function length(History storage self) internal view returns (uint256) {\\n return self._checkpoints.length;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,\\n * or by updating the last one.\\n */\\n function _insert(Checkpoint[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) {\\n uint256 pos = self.length;\\n\\n if (pos > 0) {\\n // Copying to memory is important here.\\n Checkpoint memory last = _unsafeAccess(self, pos - 1);\\n\\n // Checkpoint keys must be non-decreasing.\\n require(last._blockNumber <= key, \\\"Checkpoint: decreasing keys\\\");\\n\\n // Update or push new checkpoint\\n if (last._blockNumber == key) {\\n _unsafeAccess(self, pos - 1)._value = value;\\n } else {\\n self.push(Checkpoint({_blockNumber: key, _value: value}));\\n }\\n return (last._value, value);\\n } else {\\n self.push(Checkpoint({_blockNumber: key, _value: value}));\\n return (0, value);\\n }\\n }\\n\\n /**\\n * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _upperBinaryLookup(\\n Checkpoint[] storage self,\\n uint32 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._blockNumber > key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _lowerBinaryLookup(\\n Checkpoint[] storage self,\\n uint32 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._blockNumber < key) {\\n low = mid + 1;\\n } else {\\n high = mid;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.\\n */\\n function _unsafeAccess(Checkpoint[] storage self, uint256 pos) private pure returns (Checkpoint storage result) {\\n assembly {\\n mstore(0, self.slot)\\n result.slot := add(keccak256(0, 0x20), pos)\\n }\\n }\\n\\n struct Trace224 {\\n Checkpoint224[] _checkpoints;\\n }\\n\\n struct Checkpoint224 {\\n uint32 _key;\\n uint224 _value;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint.\\n *\\n * Returns previous value and new value.\\n */\\n function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) {\\n return _insert(self._checkpoints, key, value);\\n }\\n\\n /**\\n * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none.\\n */\\n function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) {\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.\\n */\\n function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) {\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.\\n *\\n * NOTE: This is a variant of {upperLookup} that is optimised to find \\\"recent\\\" checkpoint (checkpoints with high keys).\\n */\\n function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) {\\n uint256 len = self._checkpoints.length;\\n\\n uint256 low = 0;\\n uint256 high = len;\\n\\n if (len > 5) {\\n uint256 mid = len - MathUpgradeable.sqrt(len);\\n if (key < _unsafeAccess(self._checkpoints, mid)._key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);\\n\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.\\n */\\n function latest(Trace224 storage self) internal view returns (uint224) {\\n uint256 pos = self._checkpoints.length;\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value\\n * in the most recent checkpoint.\\n */\\n function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) {\\n uint256 pos = self._checkpoints.length;\\n if (pos == 0) {\\n return (false, 0, 0);\\n } else {\\n Checkpoint224 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1);\\n return (true, ckpt._key, ckpt._value);\\n }\\n }\\n\\n /**\\n * @dev Returns the number of checkpoint.\\n */\\n function length(Trace224 storage self) internal view returns (uint256) {\\n return self._checkpoints.length;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,\\n * or by updating the last one.\\n */\\n function _insert(Checkpoint224[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) {\\n uint256 pos = self.length;\\n\\n if (pos > 0) {\\n // Copying to memory is important here.\\n Checkpoint224 memory last = _unsafeAccess(self, pos - 1);\\n\\n // Checkpoint keys must be non-decreasing.\\n require(last._key <= key, \\\"Checkpoint: decreasing keys\\\");\\n\\n // Update or push new checkpoint\\n if (last._key == key) {\\n _unsafeAccess(self, pos - 1)._value = value;\\n } else {\\n self.push(Checkpoint224({_key: key, _value: value}));\\n }\\n return (last._value, value);\\n } else {\\n self.push(Checkpoint224({_key: key, _value: value}));\\n return (0, value);\\n }\\n }\\n\\n /**\\n * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _upperBinaryLookup(\\n Checkpoint224[] storage self,\\n uint32 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._key > key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _lowerBinaryLookup(\\n Checkpoint224[] storage self,\\n uint32 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._key < key) {\\n low = mid + 1;\\n } else {\\n high = mid;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.\\n */\\n function _unsafeAccess(\\n Checkpoint224[] storage self,\\n uint256 pos\\n ) private pure returns (Checkpoint224 storage result) {\\n assembly {\\n mstore(0, self.slot)\\n result.slot := add(keccak256(0, 0x20), pos)\\n }\\n }\\n\\n struct Trace160 {\\n Checkpoint160[] _checkpoints;\\n }\\n\\n struct Checkpoint160 {\\n uint96 _key;\\n uint160 _value;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint.\\n *\\n * Returns previous value and new value.\\n */\\n function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) {\\n return _insert(self._checkpoints, key, value);\\n }\\n\\n /**\\n * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none.\\n */\\n function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) {\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.\\n */\\n function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) {\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.\\n *\\n * NOTE: This is a variant of {upperLookup} that is optimised to find \\\"recent\\\" checkpoint (checkpoints with high keys).\\n */\\n function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) {\\n uint256 len = self._checkpoints.length;\\n\\n uint256 low = 0;\\n uint256 high = len;\\n\\n if (len > 5) {\\n uint256 mid = len - MathUpgradeable.sqrt(len);\\n if (key < _unsafeAccess(self._checkpoints, mid)._key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);\\n\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.\\n */\\n function latest(Trace160 storage self) internal view returns (uint160) {\\n uint256 pos = self._checkpoints.length;\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value\\n * in the most recent checkpoint.\\n */\\n function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) {\\n uint256 pos = self._checkpoints.length;\\n if (pos == 0) {\\n return (false, 0, 0);\\n } else {\\n Checkpoint160 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1);\\n return (true, ckpt._key, ckpt._value);\\n }\\n }\\n\\n /**\\n * @dev Returns the number of checkpoint.\\n */\\n function length(Trace160 storage self) internal view returns (uint256) {\\n return self._checkpoints.length;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,\\n * or by updating the last one.\\n */\\n function _insert(Checkpoint160[] storage self, uint96 key, uint160 value) private returns (uint160, uint160) {\\n uint256 pos = self.length;\\n\\n if (pos > 0) {\\n // Copying to memory is important here.\\n Checkpoint160 memory last = _unsafeAccess(self, pos - 1);\\n\\n // Checkpoint keys must be non-decreasing.\\n require(last._key <= key, \\\"Checkpoint: decreasing keys\\\");\\n\\n // Update or push new checkpoint\\n if (last._key == key) {\\n _unsafeAccess(self, pos - 1)._value = value;\\n } else {\\n self.push(Checkpoint160({_key: key, _value: value}));\\n }\\n return (last._value, value);\\n } else {\\n self.push(Checkpoint160({_key: key, _value: value}));\\n return (0, value);\\n }\\n }\\n\\n /**\\n * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _upperBinaryLookup(\\n Checkpoint160[] storage self,\\n uint96 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._key > key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _lowerBinaryLookup(\\n Checkpoint160[] storage self,\\n uint96 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._key < key) {\\n low = mid + 1;\\n } else {\\n high = mid;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.\\n */\\n function _unsafeAccess(\\n Checkpoint160[] storage self,\\n uint256 pos\\n ) private pure returns (Checkpoint160 storage result) {\\n assembly {\\n mstore(0, self.slot)\\n result.slot := add(keccak256(0, 0x20), pos)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51ea916844ee2c53874c6895ce37acbca0250977b49b48909d75ad439f38f211\",\"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.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x07ac95acad040f1fb1f6120dd0aa5f702db69446e95f82613721879d30de0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.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 `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\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 /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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(bytes32 hash, bytes32 r, bytes32 vs) 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(bytes32 hash, bytes32 r, bytes32 vs) 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(bytes32 hash, uint8 v, bytes32 r, bytes32 s) 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(bytes32 hash, uint8 v, bytes32 r, bytes32 s) 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 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\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 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0xa014f65d84b02827055d99993ccdbfb4b56b2c9e91eb278d82a93330659d06e4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC5267Upgradeable.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 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\\n * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the\\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable {\\n bytes32 private constant _TYPE_HASH =\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /// @custom:oz-renamed-from _HASHED_NAME\\n bytes32 private _hashedName;\\n /// @custom:oz-renamed-from _HASHED_VERSION\\n bytes32 private _hashedVersion;\\n\\n string private _name;\\n string private _version;\\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 _name = name;\\n _version = version;\\n\\n // Reset prior values in storage if upgrading\\n _hashedName = 0;\\n _hashedVersion = 0;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator();\\n }\\n\\n function _buildDomainSeparator() private view returns (bytes32) {\\n return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), 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 See {EIP-5267}.\\n *\\n * _Available since v4.9._\\n */\\n function eip712Domain()\\n public\\n view\\n virtual\\n override\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n )\\n {\\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\\n // and the EIP712 domain is not reliable, as it will be missing name and version.\\n require(_hashedName == 0 && _hashedVersion == 0, \\\"EIP712: Uninitialized\\\");\\n\\n return (\\n hex\\\"0f\\\", // 01111\\n _EIP712Name(),\\n _EIP712Version(),\\n block.chainid,\\n address(this),\\n bytes32(0),\\n new uint256[](0)\\n );\\n }\\n\\n /**\\n * @dev 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 _EIP712Name() internal virtual view returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev 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 _EIP712Version() internal virtual view returns (string memory) {\\n return _version;\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\\n */\\n function _EIP712NameHash() internal view returns (bytes32) {\\n string memory name = _EIP712Name();\\n if (bytes(name).length > 0) {\\n return keccak256(bytes(name));\\n } else {\\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\\n bytes32 hashedName = _hashedName;\\n if (hashedName != 0) {\\n return hashedName;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\n }\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\\n */\\n function _EIP712VersionHash() internal view returns (bytes32) {\\n string memory version = _EIP712Version();\\n if (bytes(version).length > 0) {\\n return keccak256(bytes(version));\\n } else {\\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\\n bytes32 hashedVersion = _hashedVersion;\\n if (hashedVersion != 0) {\\n return hashedVersion;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\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[48] private __gap;\\n}\\n\",\"keccak256\":\"0xeb8d6be406a373771724922eb41b5d593bc8e2dc705daa22cd1145cfc8f5a3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Storage based implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable {\\n function __ERC165Storage_init() internal onlyInitializing {\\n }\\n\\n function __ERC165Storage_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\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\":\"0x8abf30b22b9f34c48c1101400a3172483cfa4fdc5e4de6d040309463e6faee4a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\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\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\\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\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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(uint256 x, uint256 y, uint256 denominator) 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 // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\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(uint256 x, uint256 y, uint256 denominator, Rounding rounding) 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 256, 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 << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCastUpgradeable {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xcef50f95b43b038aa40aed25b62fc45906c681a5c1d504a4fdcf3bc6330a8d4b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC1271 standard signature validation method for\\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC1271 {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param hash Hash of the data to be signed\\n * @param signature Signature byte array associated with _data\\n */\\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0x0705a4b1b86d7b0bd8432118f226ba139c44b9dcaba0a6eafba2dd7d0639c544\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"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/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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(\\n address implementation,\\n bytes32 salt\\n ) internal view returns (address predicted) {\\n return predictDeterministicAddress(implementation, salt, address(this));\\n }\\n}\\n\",\"keccak256\":\"0x01f055f5c26ba25d7f83e9aa9ba877fbea4d0bf22227de046ea67494bc932999\",\"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.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 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 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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"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.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\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\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165Checker {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface.\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(\\n address account,\\n bytes4[] memory interfaceIds\\n ) internal view returns (bool[] memory) {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n *\\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\\n * should be exercised when using this function.\\n *\\n * Interface identification is specified in ERC-165.\\n */\\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\\n // prepare call\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\\n\\n // perform static call\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly {\\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0x00)\\n }\\n\\n return success && returnSize >= 0x20 && returnValue > 0;\\n }\\n}\\n\",\"keccak256\":\"0x5a08ad61f4e82b8a3323562661a86fb10b10190848073fdc13d4ac43710ffba5\",\"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\"},\"src/IVocdoniProposal.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.17;\\n\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\n\\n/// @title IVocdoniProposal\\n/// @notice An interface to be implemented by DAO plugins that create and execute gasless proposals.\\n/// @dev Slightly modified from the original Aragon OSx IProposal interface.\\ninterface IVocdoniProposal {\\n /// @notice Emitted when a proposal is created.\\n /// @param proposalId The ID of the proposal.\\n /// @param vochainProposalId The ID of the proposal in the Vochain.\\n /// @param creator The creator of the proposal.\\n /// @param startDate The start date of the proposal in seconds.\\n /// @param voteEndDate The vote end date of the proposal in seconds.\\n /// @param tallyEndDate The tally end date of the proposal in seconds.\\n /// @param actions The actions that will be executed if the proposal passes.\\n /// @param allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1, the proposal succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\\n event ProposalCreated(\\n uint256 indexed proposalId,\\n bytes32 indexed vochainProposalId,\\n address indexed creator,\\n uint64 startDate,\\n uint64 voteEndDate,\\n uint64 tallyEndDate,\\n IDAO.Action[] actions,\\n uint256 allowFailureMap\\n );\\n\\n /// @notice Emitted when a proposal is executed.\\n /// @param proposalId The ID of the proposal.\\n event ProposalExecuted(uint256 indexed proposalId);\\n\\n /// @notice Returns the proposal count determining the next proposal ID.\\n /// @return The proposal count.\\n function proposalCount() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x05f07886ff2abe6c5e36dcff35c6e01573865c71314239a7f72da962ae9ff47a\",\"license\":\"AGPL-3.0-or-later\"},\"src/IVocdoniVoting.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity ^0.8.17;\\n\\n/// @title IVocdoniVoting\\n/// @author Vocdoni\\n/// @notice The Vocdoni gasless voting contract interface for the OSX plugin.\\n/// @notice The voting Proposal is managed gasless on the Vocdoni blockchain.\\ninterface IVocdoniVoting {\\n /// @notice Emitted when one or more execution multisig members are added.\\n /// @param newMembers The addresses of the new execution multisig members.\\n event ExecutionMultisigMembersAdded(address[] newMembers);\\n\\n /// @notice Emitted when one or more execution multisig member are removed.\\n /// @param removedMembers The addresses of the removed execution multisig members.\\n event ExecutionMultisigMembersRemoved(address[] removedMembers);\\n\\n /// @notice Emitted when the tally of a proposal is set.\\n /// @param proposalId The ID of the proposal.\\n /// @param tally The tally.\\n event TallySet(uint256 indexed proposalId, uint256[][] tally);\\n\\n /// @notice Emitted when the tally of a proposal is approved by a member.\\n /// @param proposalId The ID of the proposal.\\n event TallyApproval(uint256 indexed proposalId, address indexed approver);\\n\\n /// @notice Thrown if the address list length is out of bounds.\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error AddresslistLengthOutOfBounds(uint16 limit, uint256 actual);\\n\\n /// @notice Thrown if the minimal approvals value is out of bounds (less than 1 or greater than the number of members in the address list).\\n /// @param limit The maximal value.\\n /// @param actual The actual value.\\n error MinApprovalsOutOfBounds(uint16 limit, uint16 actual);\\n\\n /// @notice Thrown if the vote phase duration is out of bounds (more than 1 year or less than 1 hour).\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error VoteDurationOutOfBounds(uint64 limit, uint64 actual);\\n\\n /// @notice Trown if the tally phase duration is out of bounds (more than 1 year or less than 1 hour).\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error TallyDurationOutOfBounds(uint64 limit, uint64 actual);\\n\\n /// @notice Thrown if the start date is invalid.\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error InvalidStartDate(uint64 limit, uint64 actual);\\n\\n /// @notice Thrown if the end date is invalid.\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error InvalidVoteEndDate(uint64 limit, uint64 actual);\\n\\n /// @notice Thrown if the tally end date is invalid.\\n /// @param limit The tally end date.\\n /// @param actual The actual value.\\n error InvalidTallyEndDate(uint64 limit, uint64 actual);\\n\\n /// @notice Thrown if the plugin settings are updated too recently.\\n /// @param lastUpdate The block number of the last update.\\n error PluginSettingsUpdatedTooRecently(uint64 lastUpdate);\\n\\n /// @notice Thrown if the execution multisig is updated too recently.\\n /// @param lastUpdate The block number of the last update.\\n error ExecutionMultisigUpdatedTooRecently(uint64 lastUpdate);\\n\\n /// @notice Thrown if the proposal is already executed.\\n /// @param proposalId The ID of the proposal.\\n error ProposalAlreadyExecuted(uint256 proposalId);\\n\\n /// @notice Thrown if the proposal tally is invalid.\\n /// @param tally The tally of the proposal.\\n error InvalidTally(uint256[][] tally);\\n\\n /// @notice Thrown if the proposal tally is already set and approved.\\n /// @param approvals The number of approvals.\\n /// @param minApprovals The minimum number of approvals required.\\n error TallyAlreadyApproved(uint256 approvals, uint16 minApprovals);\\n\\n /// @notice Thrown is the tally is already approved by the sender.\\n /// @param sender The sender.\\n error TallyAlreadyApprovedBySender(address sender);\\n\\n /// @notice Thrown if the proposal tally is not approved by enough execution multisig members.\\n /// @param minApprovals The minimum number of approvals required.\\n /// @param actualApprovals The actual number of approvals.\\n error NotEnoughApprovals(uint16 minApprovals, uint16 actualApprovals);\\n\\n /// @notice Thrown if an address is not valid or not supported\\n /// @param addr The address\\n error InvalidAddress(address addr);\\n\\n /// @notice Thrown if the proposal is not in the tally phase\\n /// @param voteEndDate The end date of the proposal\\n /// @param tallyEndDate The tally end date of the proposal\\n /// @param currentTimestamp The current timestamp\\n error ProposalNotInTallyPhase(\\n uint64 voteEndDate,\\n uint64 tallyEndDate,\\n uint256 currentTimestamp\\n );\\n\\n /// @notice Thrown if the msg.sender does not have enough voting power\\n /// @param required The required voting power\\n error NotEnoughVotingPower(uint256 required);\\n\\n /// @notice Thrown if the msg.sender is not a execution multisig member\\n /// @param sender The sender\\n error OnlyExecutionMultisig(address sender);\\n\\n /// @notice Thrown if the support threshold is not reached\\n /// @param currentSupport The current support\\n /// @param supportThreshold The support threshold\\n error SupportThresholdNotReached(uint256 currentSupport, uint32 supportThreshold);\\n\\n /// @notice Thrown if the minimum participation is not reached\\n /// @param currentVotingPower The current voting power\\n /// @param minVotingPower The minimum voting power to reach\\n error MinParticipationNotReached(uint256 currentVotingPower, uint256 minVotingPower);\\n\\n /// @notice Thrown if the total voting power is invalid\\n /// @param totalVotingPower The total voting power\\n error InvalidTotalVotingPower(uint256 totalVotingPower);\\n\\n /// @notice Thrown if invalid list length\\n /// @param length The actual length\\n error InvalidListLength(uint256 length);\\n\\n /// @notice Adds new execution multisig members.\\n /// @param _members The addresses of the new execution multisig members.\\n function addExecutionMultisigMembers(address[] calldata _members) external;\\n\\n /// @notice Removes execution multisig members.\\n /// @param _members The addresses of the execution multisig members to remove.\\n function removeExecutionMultisigMembers(address[] calldata _members) external;\\n\\n /// @notice Returns whether an address is a execution ultisig member.\\n /// @param _member The address to check.\\n /// @return Whether the address is a execution multisig member.\\n function isExecutionMultisigMember(address _member) external view returns (bool);\\n\\n /// @notice Sets the tally of a given proposal.\\n /// @param _proposalId The ID of the proposal to set the tally of.\\n /// @param _tally The tally to set.\\n function setTally(uint256 _proposalId, uint256[][] memory _tally) external;\\n\\n /// @notice Approves a proposal tally.\\n /// @param _proposalId The ID of the proposal to approve.\\n /// @param _tryExecution Whether to try to execute the proposal if the tally is approved.\\n function approveTally(uint256 _proposalId, bool _tryExecution) external;\\n\\n /// @notice Executes a proposal.\\n /// @param _proposalId The ID of the proposal to execute.\\n function executeProposal(uint256 _proposalId) external;\\n}\\n\",\"keccak256\":\"0xff25f8c92aeb6b2e19eaaab43ee263adee87e34eb73e1564a1d8c79ed53a268d\",\"license\":\"AGPL-3.0-or-later\"},\"src/VocdoniProposalUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.17;\\n\\nimport {CountersUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {IVocdoniProposal} from \\\"./IVocdoniProposal.sol\\\";\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\n\\n/// @title VocdoniProposalUpgradeable\\n/// @notice An abstract contract containing the traits and internal functionality to create and execute gasless proposals that can be inherited by upgradeable DAO plugins.\\n/// @dev Slighly modified from the original Aragon OSx ProposalUpgradeable contract.\\nabstract contract VocdoniProposalUpgradeable is IVocdoniProposal, ERC165Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n /// @notice The incremental ID for proposals and executions.\\n CountersUpgradeable.Counter private proposalCounter;\\n\\n /// @inheritdoc IVocdoniProposal\\n function proposalCount() public view override returns (uint256) {\\n return proposalCounter.current();\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IVocdoniProposal).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @notice Creates a proposal ID.\\n /// @return proposalId The proposal ID.\\n function _createProposalId() internal returns (uint256 proposalId) {\\n proposalId = proposalCount();\\n proposalCounter.increment();\\n }\\n\\n /// @notice Internal function to execute a proposal.\\n /// @param _proposalId The ID of the proposal to be executed.\\n /// @param _actions The array of actions to be executed.\\n /// @param _allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1, the proposal succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\\n /// @return execResults The array with the results of the executed actions.\\n /// @return failureMap The failure map encoding which actions have failed.\\n function _executeProposal(\\n IDAO _dao,\\n uint256 _proposalId,\\n IDAO.Action[] memory _actions,\\n uint256 _allowFailureMap\\n ) internal virtual returns (bytes[] memory execResults, uint256 failureMap) {\\n (execResults, failureMap) = _dao.execute(bytes32(_proposalId), _actions, _allowFailureMap);\\n emit ProposalExecuted({proposalId: _proposalId});\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x9e676137e9c16f71f0bf8f72cdca449739bcf746156c8867a9a8aad7b6c3f9b6\",\"license\":\"AGPL-3.0-or-later\"},\"src/VocdoniVoting.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity ^0.8.17;\\n\\nimport {SafeCastUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\\\";\\nimport {IVotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\nimport {PluginUUPSUpgradeable} from \\\"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\\\";\\nimport {RATIO_BASE, _applyRatioCeiled, RatioOutOfBounds} from \\\"@aragon/osx/plugins/utils/Ratio.sol\\\";\\nimport {Addresslist} from \\\"@aragon/osx/plugins/utils/Addresslist.sol\\\";\\n\\nimport {VocdoniProposalUpgradeable} from \\\"./VocdoniProposalUpgradeable.sol\\\";\\nimport {IVocdoniVoting} from \\\"./IVocdoniVoting.sol\\\";\\n\\n/// @title VocdoniVoting\\n/// @author Vocdoni\\n/// @notice The Vocdoni gasless voting data contract for the OSX plugin.\\n/// @notice The voting Proposal is managed gasless on the Vocdoni blockchain.\\ncontract VocdoniVoting is\\n IVocdoniVoting,\\n PluginUUPSUpgradeable,\\n VocdoniProposalUpgradeable,\\n Addresslist\\n{\\n using SafeCastUpgradeable for uint256;\\n\\n /// @notice The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID of the contract.\\n bytes4 internal constant VOCDONI_INTERFACE_ID =\\n this.initialize.selector ^ this.createProposal.selector;\\n\\n /// @notice The ID of the permission required to update the plugin settings.\\n bytes32 public constant UPDATE_PLUGIN_SETTINGS_PERMISSION_ID =\\n keccak256(\\\"UPDATE_PLUGIN_SETTINGS_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to add/remove executionMultisig members.\\n bytes32 public constant UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID =\\n keccak256(\\\"UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION\\\");\\n\\n /// @notice Emitted when the plugin settings are updated.\\n /// @param onlyExecutionMultisigProposalCreation If true, only executionMultisig members can create proposals.\\n /// @param minTallyApprovals The minimum number of approvals required for a tally to be considered accepted.\\n /// @param minParticipation The minimum participation value. Its value has to be in the interval [0, 10^6] defined by `RATIO_BASE = 10**6`.\\n /// @param supportThreshold The support threshold value. Its value has to be in the interval [0, 10^6] defined by `RATIO_BASE = 10**6`.\\n /// @param minVoteDuration The minimum duration of the vote phase of a proposal.\\n /// @param minTallyDuration The minimum duration of the tally phase of a proposal.\\n /// @param daoTokenAddress The address of the DAO token.\\n /// @param censusStrategyURI The URI containing the predicate of the census strategy to be used in the proposals. See: https://github.com/vocdoni/census3\\n /// @param minProposerVotingPower The minimum voting power required to create a proposal. Voting power is extracted from the DAO token\\n event PluginSettingsUpdated(\\n bool onlyExecutionMultisigProposalCreation,\\n uint16 indexed minTallyApprovals,\\n uint32 minParticipation,\\n uint32 supportThreshold,\\n uint64 minVoteDuration,\\n uint64 minTallyDuration,\\n address indexed daoTokenAddress,\\n string indexed censusStrategyURI,\\n uint256 minProposerVotingPower\\n );\\n\\n /// @notice A container for the Vocdoni voting plugin settings\\n /// @param onlyExecutionMultisigProposalCreation If true, only executionMultisig members can create proposals.\\n /// @param minTallyApprovals The minimum number of approvals required for the tally to be considered valid.\\n /// @param minParticipation The minimum participation value. Its value has to be in the interval [0, 10^6] defined by `RATIO_BASE = 10**6`.\\n /// @param supportThreshold The support threshold value. Its value has to be in the interval [0, 10^6] defined by `RATIO_BASE = 10**6`.\\n /// @param minVoteDuration The minimum duration of the vote phase of a proposal.\\n /// @param minTallyDuration The minimum duration of the tally phase of a proposal.\\n /// @param daoTokenAddress The address of the DAO token.\\n /// @param minProposerVotingPower The minimum voting power required to create a proposal. Voting power is extracted from the DAO token\\n /// @param censusStrategyURI The URI containing he census strategy to be used in the proposals. See: https://github.com/vocdoni/census3\\n struct PluginSettings {\\n bool onlyExecutionMultisigProposalCreation;\\n uint16 minTallyApprovals;\\n uint32 minParticipation;\\n uint32 supportThreshold;\\n uint64 minVoteDuration;\\n uint64 minTallyDuration;\\n address daoTokenAddress;\\n uint256 minProposerVotingPower;\\n string censusStrategyURI;\\n }\\n\\n /// @notice A container for the proposal parameters.\\n /// @param securityBlock Block number used for limiting contract usage when plugin settings are updated\\n /// @param startDate The timestamp when the proposal starts.\\n /// @param voteEndDate The timestamp when the proposal ends. At this point the tally can be set.\\n /// @param tallyEndDate The timestamp when the proposal expires. Proposal can't be executed after.\\n /// @param totalVotingPower The total voting power of the proposal.\\n /// @param censusURI The URI of the census.\\n /// @param censusRoot The root of the census.\\n struct ProposalParameters {\\n uint64 securityBlock;\\n uint64 startDate;\\n uint64 voteEndDate;\\n uint64 tallyEndDate;\\n uint256 totalVotingPower;\\n string censusURI;\\n bytes32 censusRoot;\\n }\\n\\n /// @notice A container for proposal-related information.\\n /// @param executed Whether the proposal is executed or not.\\n /// @param vochainProposalId The ID of the proposal in the Vochain.\\n /// @param allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1,\\n // the proposal succeeds even if the nth action reverts. A failure map value of 0 requires every action to not revert.\\n /// @param parameters The parameters of the proposal.\\n /// @param tally The tally of the proposal.\\n /// @dev tally only supports [[Yes, No, Abstain]] schema in this order. i.e [[10, 5, 2]] means 10 Yes, 5 No, 2 Abstain.\\n /// @param approvers The approvers of the tally.\\n /// @param actions The actions to be executed when the proposal passes.\\n struct Proposal {\\n bool executed;\\n bytes32 vochainProposalId;\\n uint256 allowFailureMap;\\n ProposalParameters parameters;\\n uint256[][] tally;\\n address[] approvers;\\n IDAO.Action[] actions;\\n }\\n\\n /// @notice Keeps track at which block number the plugin settings have been changed the last time.\\n uint64 private lastPluginSettingsChange;\\n\\n /// @notice Keeps track at which block number the executionMultisig has been changed the last time.\\n uint64 private lastExecutionMultisigChange;\\n\\n /// @notice A mapping between proposal IDs and proposal information.\\n mapping(uint256 => Proposal) private proposals;\\n\\n /// @notice The current plugin settings.\\n PluginSettings private pluginSettings;\\n\\n /// @notice Initializes the plugin.\\n /// @param _dao The DAO address.\\n /// @param _executionMultisigAddresses The addresses of the executionMultisig.\\n /// @param _pluginSettings The initial plugin settings.\\n function initialize(\\n IDAO _dao,\\n address[] calldata _executionMultisigAddresses,\\n PluginSettings memory _pluginSettings\\n ) external initializer {\\n __PluginUUPSUpgradeable_init(_dao);\\n _addExecutionMultisigMembers(_executionMultisigAddresses);\\n _updatePluginSettings(_pluginSettings);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(\\n bytes4 _interfaceId\\n )\\n public\\n view\\n virtual\\n override(PluginUUPSUpgradeable, VocdoniProposalUpgradeable)\\n returns (bool)\\n {\\n return\\n _interfaceId == VOCDONI_INTERFACE_ID ||\\n _interfaceId == type(IVocdoniVoting).interfaceId ||\\n _interfaceId == type(Addresslist).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function addExecutionMultisigMembers(\\n address[] calldata _members\\n ) external override auth(UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID) {\\n _addExecutionMultisigMembers(_members);\\n }\\n\\n /// @notice Private function for adding execution multisig members.\\n /// @param _members The addresses to add.\\n function _addExecutionMultisigMembers(address[] calldata _members) private {\\n _guardExecutionMultisig();\\n if (_members.length == 0) {\\n revert InvalidListLength({length: _members.length});\\n }\\n\\n uint256 newAddresslistLength = addresslistLength() + _members.length;\\n\\n // Check if the new address list length would be greater than `type(uint16).max`, the maximal number of approvals.\\n if (newAddresslistLength > type(uint16).max) {\\n revert AddresslistLengthOutOfBounds({\\n limit: type(uint16).max,\\n actual: newAddresslistLength\\n });\\n }\\n\\n _addAddresses(_members);\\n lastExecutionMultisigChange = uint64(block.number);\\n\\n emit ExecutionMultisigMembersAdded({newMembers: _members});\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function removeExecutionMultisigMembers(\\n address[] calldata _members\\n ) external override auth(UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID) {\\n _removeExecutionMultisigMember(_members);\\n }\\n\\n /// @notice Private function for removing execution multisig members.\\n /// @param _members The addresses to remove.\\n function _removeExecutionMultisigMember(address[] calldata _members) private {\\n _guardExecutionMultisig();\\n if (_members.length == 0) {\\n revert InvalidListLength({length: _members.length});\\n }\\n\\n uint16 newAddresslistLength = uint16(addresslistLength() - _members.length);\\n\\n // Check if the new address list length would become less than the current minimum number of approvals required.\\n if (newAddresslistLength < pluginSettings.minTallyApprovals) {\\n revert MinApprovalsOutOfBounds({\\n limit: newAddresslistLength,\\n actual: pluginSettings.minTallyApprovals\\n });\\n }\\n\\n _removeAddresses(_members);\\n lastExecutionMultisigChange = uint64(block.number);\\n\\n emit ExecutionMultisigMembersRemoved({removedMembers: _members});\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function isExecutionMultisigMember(address _member) public view override returns (bool) {\\n return _isExecutionMultisigMember(_member);\\n }\\n\\n /// @notice Internal function for checking whether an address is a executionMultisig member.\\n /// @param _member The address to check.\\n /// @return Whether the address is a executionMultisig member.\\n function _isExecutionMultisigMember(address _member) internal view returns (bool) {\\n return isListed(_member);\\n }\\n\\n /// @notice Updates the plugin settings.\\n /// @param _pluginSettings The new plugin settings.\\n /// @dev The called must have the UPDATE_PLUGIN_SETTINGS_PERMISSION_ID permission.\\n function updatePluginSettings(\\n PluginSettings memory _pluginSettings\\n ) external auth(UPDATE_PLUGIN_SETTINGS_PERMISSION_ID) {\\n _updatePluginSettings(_pluginSettings);\\n }\\n\\n /// @notice Internal function for updating the plugin settings.\\n /// @param _pluginSettings The new plugin settings.\\n function _updatePluginSettings(PluginSettings memory _pluginSettings) private {\\n _guardPluginSettings();\\n\\n if (_pluginSettings.supportThreshold > RATIO_BASE - 1) {\\n revert RatioOutOfBounds({\\n limit: RATIO_BASE - 1,\\n actual: _pluginSettings.supportThreshold\\n });\\n }\\n // Require the minimum participation value to be in the interval [0, 10^6], because `>=` comparision is used in the participation criterion.\\n if (_pluginSettings.minParticipation > RATIO_BASE) {\\n revert RatioOutOfBounds({limit: RATIO_BASE, actual: _pluginSettings.minParticipation});\\n }\\n\\n if (_pluginSettings.minVoteDuration > 365 days) {\\n revert VoteDurationOutOfBounds({\\n limit: 365 days,\\n actual: _pluginSettings.minVoteDuration\\n });\\n }\\n\\n if (_pluginSettings.minVoteDuration < 5 minutes) {\\n revert VoteDurationOutOfBounds({\\n limit: 60 minutes,\\n actual: _pluginSettings.minVoteDuration\\n });\\n }\\n\\n if (_pluginSettings.minTallyDuration > 365 days) {\\n revert TallyDurationOutOfBounds({\\n limit: 365 days,\\n actual: _pluginSettings.minTallyDuration\\n });\\n }\\n\\n if (_pluginSettings.minTallyDuration < 5 minutes) {\\n revert TallyDurationOutOfBounds({\\n limit: 60 minutes,\\n actual: _pluginSettings.minTallyDuration\\n });\\n }\\n\\n // update plugin settings\\n pluginSettings = _pluginSettings;\\n lastPluginSettingsChange = uint64(block.number);\\n\\n emit PluginSettingsUpdated({\\n onlyExecutionMultisigProposalCreation: _pluginSettings\\n .onlyExecutionMultisigProposalCreation,\\n minTallyApprovals: _pluginSettings.minTallyApprovals,\\n minVoteDuration: _pluginSettings.minVoteDuration,\\n minTallyDuration: _pluginSettings.minTallyDuration,\\n minParticipation: _pluginSettings.minParticipation,\\n supportThreshold: _pluginSettings.supportThreshold,\\n daoTokenAddress: _pluginSettings.daoTokenAddress,\\n censusStrategyURI: _pluginSettings.censusStrategyURI,\\n minProposerVotingPower: _pluginSettings.minProposerVotingPower\\n });\\n }\\n\\n /// @notice Returns a proposal.\\n /// @param _proposalId The ID of the proposal to return.\\n /// @return executed Whether the proposal is executed or not.\\n /// @return approvers The approvers of the tally.\\n /// @return vochainProposalId The ID of the proposal in the Vochain.\\n /// @return parameters The parameters of the proposal.\\n /// @return allowFailureMap The allow failure map of the proposal.\\n /// @return tally The tally of the proposal.\\n /// @return actions The actions of the proposal.\\n function getProposal(\\n uint256 _proposalId\\n )\\n public\\n view\\n returns (\\n bool executed,\\n address[] memory approvers,\\n bytes32 vochainProposalId,\\n ProposalParameters memory parameters,\\n uint256 allowFailureMap,\\n uint256[][] memory tally,\\n IDAO.Action[] memory actions\\n )\\n {\\n Proposal memory proposal = proposals[_proposalId];\\n executed = proposal.executed;\\n approvers = proposal.approvers;\\n vochainProposalId = proposal.vochainProposalId;\\n parameters = proposal.parameters;\\n allowFailureMap = proposal.allowFailureMap;\\n tally = proposal.tally;\\n actions = proposal.actions;\\n }\\n\\n /// @notice Internal function for creating a proposal.\\n /// @param _vochainProposalId The Vocdoni proposal ID.\\n /// @param _allowFailureMap The allow failure map of the proposal.\\n /// @param _parameters The parameters of the proposal.\\n /// @param _actions The actions of the proposal.\\n /// @return The ID of the created proposal.\\n function createProposal(\\n bytes32 _vochainProposalId,\\n uint256 _allowFailureMap,\\n ProposalParameters memory _parameters,\\n IDAO.Action[] memory _actions\\n ) external returns (uint256) {\\n _guardExecutionMultisig();\\n _guardPluginSettings();\\n\\n PluginSettings memory _pluginSettings = pluginSettings;\\n address sender = _msgSender();\\n\\n if (\\n _pluginSettings.onlyExecutionMultisigProposalCreation &&\\n !_isExecutionMultisigMember(sender)\\n ) {\\n revert OnlyExecutionMultisig({sender: sender});\\n }\\n\\n if (_pluginSettings.minProposerVotingPower != 0) {\\n // Because of the checks in `VocdoniVotingSetup`, we can assume that `votingToken` is an [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.\\n uint256 votes = IVotesUpgradeable(_pluginSettings.daoTokenAddress).getVotes(sender);\\n uint256 balance = IERC20Upgradeable(_pluginSettings.daoTokenAddress).balanceOf(sender);\\n\\n if (\\n votes < _pluginSettings.minProposerVotingPower &&\\n balance < _pluginSettings.minProposerVotingPower\\n ) {\\n revert NotEnoughVotingPower({required: _pluginSettings.minProposerVotingPower});\\n }\\n }\\n\\n (\\n _parameters.startDate,\\n _parameters.voteEndDate,\\n _parameters.tallyEndDate\\n ) = _validateProposalDates(\\n _parameters.startDate,\\n _parameters.voteEndDate,\\n _parameters.tallyEndDate\\n );\\n\\n if (_parameters.totalVotingPower == 0) {\\n revert InvalidTotalVotingPower({totalVotingPower: _parameters.totalVotingPower});\\n }\\n\\n uint256 _proposalId = _createProposalId();\\n Proposal storage proposal = proposals[_proposalId];\\n\\n proposal.vochainProposalId = _vochainProposalId;\\n proposal.parameters.startDate = _parameters.startDate;\\n proposal.parameters.voteEndDate = _parameters.voteEndDate;\\n proposal.parameters.tallyEndDate = _parameters.tallyEndDate;\\n proposal.parameters.totalVotingPower = _parameters.totalVotingPower;\\n proposal.parameters.censusURI = _parameters.censusURI;\\n proposal.parameters.censusRoot = _parameters.censusRoot;\\n proposal.parameters.securityBlock = block.number.toUint64();\\n proposal.allowFailureMap = _allowFailureMap;\\n for (uint256 i = 0; i < _actions.length; ) {\\n proposal.actions.push(_actions[i]);\\n unchecked {\\n i++;\\n }\\n }\\n\\n emit ProposalCreated(\\n _proposalId,\\n _vochainProposalId,\\n sender,\\n _parameters.startDate,\\n _parameters.voteEndDate,\\n _parameters.tallyEndDate,\\n _actions,\\n _allowFailureMap\\n );\\n\\n return _proposalId;\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function setTally(uint256 _proposalId, uint256[][] memory _tally) public override {\\n _setTally(_proposalId, _tally);\\n }\\n\\n /// @notice Internal function for setting the tally of a given proposal.\\n /// @param _proposalId The ID of the proposal to set the tally of.\\n /// @param _tally The tally to set.\\n /// @dev The caller must be a executionMultisig member.\\n function _setTally(uint256 _proposalId, uint256[][] memory _tally) internal {\\n _guardExecutionMultisig();\\n _guardPluginSettings();\\n address sender = _msgSender();\\n\\n if (!_isExecutionMultisigMember(sender)) {\\n revert OnlyExecutionMultisig({sender: sender});\\n }\\n\\n Proposal storage proposal = proposals[_proposalId];\\n\\n if (proposal.executed) {\\n revert ProposalAlreadyExecuted({proposalId: _proposalId});\\n }\\n\\n if (!_isProposalOnTallyPhase(proposal)) {\\n revert ProposalNotInTallyPhase({\\n voteEndDate: proposal.parameters.voteEndDate,\\n tallyEndDate: proposal.parameters.tallyEndDate,\\n currentTimestamp: block.timestamp\\n });\\n }\\n\\n // only supported tally is [[Yes, No, Abstain]]\\n if (_tally.length != 1 || _tally[0].length != 3) {\\n revert InvalidTally({tally: _tally});\\n }\\n\\n // tally already set\\n if (proposal.tally.length != 0) {\\n // check proposal not already approved\\n if (proposal.approvers.length >= pluginSettings.minTallyApprovals) {\\n revert TallyAlreadyApproved({\\n approvals: proposal.approvers.length,\\n minApprovals: pluginSettings.minTallyApprovals\\n });\\n }\\n // check if the new tally is different\\n if (\\n _tally[0][0] == proposal.tally[0][0] &&\\n _tally[0][1] == proposal.tally[0][1] &&\\n _tally[0][2] == proposal.tally[0][2]\\n ) {\\n revert InvalidTally({tally: _tally});\\n }\\n // reset approvers\\n delete proposal.approvers;\\n }\\n\\n proposal.tally = _tally;\\n proposal.approvers.push(sender);\\n\\n emit TallySet({proposalId: _proposalId, tally: _tally});\\n emit TallyApproval({proposalId: _proposalId, approver: sender});\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function approveTally(uint256 _proposalId, bool _tryExecution) external override {\\n return _approveTally(_proposalId, _tryExecution);\\n }\\n\\n /// @notice Internal function for approving a proposal tally.\\n /// @param _proposalId The ID of the proposal to approve.\\n /// @param _tryExecution Whether to try to execute the proposal after approving the tally.\\n function _approveTally(uint256 _proposalId, bool _tryExecution) internal {\\n _guardExecutionMultisig();\\n _guardPluginSettings();\\n\\n address sender = _msgSender();\\n\\n if (!_isExecutionMultisigMember(sender)) {\\n revert OnlyExecutionMultisig({sender: sender});\\n }\\n\\n Proposal storage proposal = proposals[_proposalId];\\n\\n // also checks that proposal is in tally phase, as the tally cannot be set otherwise\\n if (proposal.tally.length == 0) {\\n revert InvalidTally(proposal.tally);\\n }\\n\\n if (_hasApprovedTally(proposal, sender)) {\\n revert TallyAlreadyApprovedBySender({sender: sender});\\n }\\n\\n if (proposal.approvers.length >= pluginSettings.minTallyApprovals) {\\n revert TallyAlreadyApproved({\\n approvals: proposal.approvers.length,\\n minApprovals: pluginSettings.minTallyApprovals\\n });\\n }\\n\\n // if executionMultisig changed since proposal creation, the proposal approvals of the previous executionMultisig members are not valid\\n if (proposal.parameters.securityBlock < lastExecutionMultisigChange) {\\n address[] memory newApprovers = new address[](0);\\n // newApprovers are the oldApprovers list without the non executionMultisig members at the current block\\n uint8 newApproversCount = 0;\\n for (uint256 i = 0; i < proposal.approvers.length; ) {\\n address oldApprover = proposal.approvers[i];\\n if (\\n _isExecutionMultisigMember(oldApprover) &&\\n _hasApprovedTally(proposal, oldApprover)\\n ) {\\n newApprovers[newApproversCount] = oldApprover;\\n unchecked {\\n newApproversCount++;\\n }\\n }\\n unchecked {\\n i++;\\n }\\n }\\n proposal.approvers = newApprovers;\\n proposal.parameters.securityBlock = lastExecutionMultisigChange;\\n }\\n\\n proposal.approvers.push(sender);\\n\\n emit TallyApproval({proposalId: _proposalId, approver: sender});\\n\\n if (_tryExecution) {\\n _checkTallyAndExecute(_proposalId);\\n }\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function executeProposal(uint256 _proposalId) public override {\\n _guardExecutionMultisig();\\n _guardPluginSettings();\\n\\n _checkTallyAndExecute(_proposalId);\\n }\\n\\n /// @notice Internal function to check if a proposal is on the tally phase.\\n /// @param _proposal The proposal to check\\n function _isProposalOnTallyPhase(Proposal memory _proposal) internal view returns (bool) {\\n uint64 currentBlockTimestamp = uint64(block.timestamp);\\n /// [... startDate ............ voteEndDate ............ tallyEndDate ...]\\n /// [............. Voting phase ............ Tally phase ................]\\n if (\\n _proposal.parameters.startDate < currentBlockTimestamp &&\\n _proposal.parameters.voteEndDate < currentBlockTimestamp - 1 &&\\n _proposal.parameters.tallyEndDate > currentBlockTimestamp\\n ) {\\n return true;\\n }\\n return false;\\n }\\n\\n /// @notice Internal function to check the tally and execute a proposal if the tally\\n /// number of YES votes is greater than the tally number of NO votes.\\n function _checkTallyAndExecute(uint256 _proposalId) internal {\\n Proposal memory proposal = proposals[_proposalId];\\n\\n if (proposal.executed) {\\n revert ProposalAlreadyExecuted({proposalId: _proposalId});\\n }\\n\\n // also checks that proposal is in tally phase, as the tally cannot be set otherwise\\n if (proposal.tally.length == 0) {\\n revert InvalidTally({tally: proposal.tally});\\n }\\n\\n if (proposal.parameters.tallyEndDate < block.timestamp) {\\n revert ProposalNotInTallyPhase({\\n voteEndDate: proposal.parameters.voteEndDate,\\n tallyEndDate: proposal.parameters.tallyEndDate,\\n currentTimestamp: block.timestamp\\n });\\n }\\n\\n if (proposal.approvers.length < pluginSettings.minTallyApprovals) {\\n revert NotEnoughApprovals({\\n minApprovals: pluginSettings.minTallyApprovals,\\n actualApprovals: proposal.approvers.length.toUint16()\\n });\\n }\\n\\n uint256 currentVotingPower = proposal.tally[0][0] +\\n proposal.tally[0][1] +\\n proposal.tally[0][2];\\n\\n uint256 minVotingPower = _applyRatioCeiled(\\n proposal.parameters.totalVotingPower,\\n pluginSettings.minParticipation\\n );\\n\\n if (minVotingPower > currentVotingPower) {\\n revert MinParticipationNotReached({\\n currentVotingPower: currentVotingPower,\\n minVotingPower: minVotingPower\\n });\\n }\\n\\n uint256 yesRatioPart = (RATIO_BASE - pluginSettings.supportThreshold) *\\n proposal.tally[0][0];\\n uint256 noRatioPart = pluginSettings.supportThreshold * proposal.tally[0][1];\\n if (yesRatioPart <= noRatioPart) {\\n revert SupportThresholdNotReached({\\n currentSupport: _getCurrentSupport(proposal.tally),\\n supportThreshold: pluginSettings.supportThreshold\\n });\\n }\\n\\n proposals[_proposalId].executed = true;\\n _executeProposal(dao(), _proposalId, proposal.actions, proposal.allowFailureMap);\\n }\\n\\n /// @notice Internal function calculating the current support of a proposal\\n /// @param _tally The tally of the proposal.\\n /// @return The current support of the proposal.\\n function _getCurrentSupport(uint256[][] memory _tally) internal pure returns (uint256) {\\n return (_tally[0][0] * RATIO_BASE) / (_tally[0][0] + _tally[0][1]);\\n }\\n\\n /// @notice Internal function for validating the proposal dates.\\n /// If the start date is 0, it is set to the current block timestamp.\\n /// If the end vote date is 0, it is set to the start date + min vote duration.\\n /// If the tally end date is 0, it is set to the end date + min tally duration.\\n /// @param _startDate The start date of the proposal.\\n /// @param _voteEndDate The vote end date of the proposal.\\n /// @param _tallyEndDate The tally end date of the proposal.\\n /// @return startDate The validated start date.\\n /// @return voteEndDate The validated vote end date.\\n /// @return tallyEndDate The validated tally end date.\\n function _validateProposalDates(\\n uint64 _startDate,\\n uint64 _voteEndDate,\\n uint64 _tallyEndDate\\n ) internal view virtual returns (uint64 startDate, uint64 voteEndDate, uint64 tallyEndDate) {\\n uint64 currentBlockTimestamp = block.timestamp.toUint64();\\n // check proposal start date and set it to the current block timestamp if it is 0\\n if (_startDate == 0) {\\n startDate = currentBlockTimestamp;\\n } else {\\n startDate = _startDate;\\n if (startDate < currentBlockTimestamp) {\\n revert InvalidStartDate({limit: currentBlockTimestamp, actual: startDate});\\n }\\n }\\n // check proposal end date and set it to the start date + min duration if it is 0\\n uint64 earliestVoteEndDate = startDate + pluginSettings.minVoteDuration;\\n // Since `minVoteDuration` is limited to 1 year, `startDate + minVoteDuration`\\n // can only overflow if the `startDate` is after `type(uint64).max - minVoteDuration`.\\n // In this case, the proposal creation will revert and another date can be picked.\\n if (_voteEndDate == 0) {\\n voteEndDate = earliestVoteEndDate;\\n } else {\\n voteEndDate = _voteEndDate;\\n if (voteEndDate < earliestVoteEndDate) {\\n revert InvalidVoteEndDate({limit: earliestVoteEndDate, actual: voteEndDate});\\n }\\n }\\n\\n uint64 earliestTallyEndDate = voteEndDate + pluginSettings.minTallyDuration;\\n if (_tallyEndDate == 0) {\\n tallyEndDate = earliestTallyEndDate;\\n } else {\\n tallyEndDate = _tallyEndDate;\\n if (tallyEndDate < earliestTallyEndDate) {\\n revert InvalidTallyEndDate({limit: earliestTallyEndDate, actual: tallyEndDate});\\n }\\n }\\n }\\n\\n /// @notice Gets the plugin settings.\\n /// @return The plugin settings.\\n function getPluginSettings() public view returns (PluginSettings memory) {\\n return pluginSettings;\\n }\\n\\n /// @notice Returns true if the provided _member has approved the given proposal tally\\n /// @param _proposalId The ID of the proposal.\\n /// @return Whether the msg.sender has approved the proposal tally.\\n function hasApprovedTally(uint256 _proposalId, address _member) external view returns (bool) {\\n return _hasApprovedTally(proposals[_proposalId], _member);\\n }\\n\\n /// @notice Internal function for checking if a member has approved a proposal tally.\\n /// @param _proposal The proposal to check.\\n /// @param _member The member to check.\\n /// @return Whether the member has approved the proposal tally.\\n function _hasApprovedTally(\\n Proposal memory _proposal,\\n address _member\\n ) internal pure returns (bool) {\\n for (uint256 i = 0; i < _proposal.approvers.length; ) {\\n if (_proposal.approvers[i] == _member) {\\n return true;\\n }\\n unchecked {\\n i++;\\n }\\n }\\n return false;\\n }\\n\\n /// @notice Guard checks that processes key updates are not executed in the same block\\n /// where the executionMultisig changed.\\n function _guardExecutionMultisig() internal view {\\n if (lastExecutionMultisigChange == uint64(block.number)) {\\n revert ExecutionMultisigUpdatedTooRecently({lastUpdate: lastExecutionMultisigChange});\\n }\\n }\\n\\n /// @notice Guard checks that processes key updates are not executed in the same block\\n /// where the plugin settings changed.\\n function _guardPluginSettings() internal view {\\n if (lastPluginSettingsChange == uint64(block.number)) {\\n revert PluginSettingsUpdatedTooRecently({lastUpdate: lastPluginSettingsChange});\\n }\\n }\\n\\n // get last executionMultisig change block number\\n function getLastExecutionMultisigChange() external view returns (uint64) {\\n return lastExecutionMultisigChange;\\n }\\n\\n // get last plugin settings change block number\\n function getLastPluginSettingsChange() external view returns (uint64) {\\n return lastPluginSettingsChange;\\n }\\n}\\n\",\"keccak256\":\"0x95265b6367e8882fbaa5fcd3871b7922027f119484a32da15252e2401ca38c40\",\"license\":\"AGPL-3.0-or-later\"},\"src/VocdoniVotingSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity ^0.8.17;\\n\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\nimport {DAO} from \\\"@aragon/osx/core/dao/DAO.sol\\\";\\nimport {PermissionLib} from \\\"@aragon/osx/core/permission/PermissionLib.sol\\\";\\nimport {PluginSetup, IPluginSetup} from \\\"@aragon/osx/framework/plugin/setup/PluginSetup.sol\\\";\\nimport {VocdoniVoting} from \\\"./VocdoniVoting.sol\\\";\\n\\nimport {Clones} from \\\"@openzeppelin/contracts/proxy/Clones.sol\\\";\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport {ERC165Checker} from \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {IVotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\\\";\\n\\nimport {GovernanceERC20} from \\\"@aragon/osx/token/ERC20/governance/GovernanceERC20.sol\\\";\\nimport {GovernanceWrappedERC20} from \\\"@aragon/osx/token/ERC20/governance/GovernanceWrappedERC20.sol\\\";\\nimport {IGovernanceWrappedERC20} from \\\"@aragon/osx/token/ERC20/governance/IGovernanceWrappedERC20.sol\\\";\\n\\n/// @title VocdoniVotingSetup\\n/// @author Vocdoni\\n/// @notice The setup contract of the `VocdoniVoting` plugin.\\ncontract VocdoniVotingSetup is PluginSetup {\\n using Address for address;\\n using Clones for address;\\n using ERC165Checker for address;\\n\\n /// @notice The address of `VocdoniVoting` plugin logic contract to be used in creating proxy contracts.\\n VocdoniVoting private immutable vocdoniVoting;\\n\\n /// @notice The address of the `GovernanceERC20` base contract.\\n address public immutable governanceERC20Base;\\n\\n /// @notice The address of the `GovernanceWrappedERC20` base contract.\\n address public immutable governanceWrappedERC20Base;\\n\\n /// @notice The token settings struct.\\n /// @param addr The token address. If this is `address(0)`, a new `GovernanceERC20` token is deployed. If not, the existing token is wrapped as an `GovernanceWrappedERC20`.\\n /// @param name The token name. This parameter is only relevant if the token address is `address(0)`.\\n /// @param symbol The token symbol. This parameter is only relevant if the token address is `address(0)`.\\n struct TokenSettings {\\n address addr;\\n string name;\\n string symbol;\\n }\\n\\n /// @notice Thrown if token address is passed which is not a token.\\n /// @param token The token address\\n error TokenNotContract(address token);\\n\\n /// @notice Thrown if token address is not ERC20.\\n /// @param token The token address\\n error TokenNotERC20(address token);\\n\\n /// @notice Thrown if passed helpers array is of wrong length.\\n /// @param length The array length of passed helpers.\\n error WrongHelpersArrayLength(uint256 length);\\n\\n /// @notice The contract constructor, that deploys the `VocdoniVoting` plugin logic contract.\\n constructor(\\n GovernanceERC20 _governanceERC20Base,\\n GovernanceWrappedERC20 _governanceWrappedERC20Base\\n ) {\\n governanceERC20Base = address(_governanceERC20Base);\\n governanceWrappedERC20Base = address(_governanceWrappedERC20Base);\\n vocdoniVoting = new VocdoniVoting();\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function prepareInstallation(\\n address _dao,\\n bytes calldata _data\\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData) {\\n // Decode `_data` to extract the params needed for deploying and initializing `VocdoniVoting` plugin.\\n (\\n address[] memory executionMultisig,\\n VocdoniVoting.PluginSettings memory pluginSettings,\\n TokenSettings memory tokenSettings,\\n // only used for GovernanceERC20(token is not passed)\\n GovernanceERC20.MintSettings memory mintSettings\\n ) = abi.decode(\\n _data,\\n (\\n address[],\\n VocdoniVoting.PluginSettings,\\n TokenSettings,\\n GovernanceERC20.MintSettings\\n )\\n );\\n\\n address token = tokenSettings.addr;\\n\\n // Prepare helpers.\\n address[] memory helpers = new address[](1);\\n\\n if (token != address(0)) {\\n if (!token.isContract()) {\\n revert TokenNotContract(token);\\n }\\n\\n if (!_isERC20(token)) {\\n revert TokenNotERC20(token);\\n }\\n\\n // [0] = IERC20Upgradeable, [1] = IVotesUpgradeable, [2] = IGovernanceWrappedERC20\\n bool[] memory supportedIds = _getTokenInterfaceIds(token);\\n\\n if (\\n // If token supports none of them\\n // it's simply ERC20 which gets checked by _isERC20\\n // Currently, not a satisfiable check.\\n (!supportedIds[0] && !supportedIds[1] && !supportedIds[2]) ||\\n // If token supports IERC20, but neither\\n // IVotes nor IGovernanceWrappedERC20, it needs wrapping.\\n (supportedIds[0] && !supportedIds[1] && !supportedIds[2])\\n ) {\\n token = governanceWrappedERC20Base.clone();\\n // User already has a token. We need to wrap it in\\n // GovernanceWrappedERC20 in order to make the token\\n // include governance functionality.\\n GovernanceWrappedERC20(token).initialize(\\n IERC20Upgradeable(tokenSettings.addr),\\n tokenSettings.name,\\n tokenSettings.symbol\\n );\\n }\\n } else {\\n // Clone a `GovernanceERC20`.\\n token = governanceERC20Base.clone();\\n GovernanceERC20(token).initialize(\\n IDAO(_dao),\\n tokenSettings.name,\\n tokenSettings.symbol,\\n mintSettings\\n );\\n }\\n\\n helpers[0] = token;\\n pluginSettings.daoTokenAddress = token;\\n\\n // Prepare and Deploy the plugin proxy.\\n plugin = createERC1967Proxy(\\n address(vocdoniVoting),\\n abi.encodeCall(\\n VocdoniVoting.initialize,\\n (IDAO(_dao), executionMultisig, pluginSettings)\\n )\\n );\\n\\n // Prepare permissions\\n PermissionLib.MultiTargetPermission[]\\n memory permissions = new PermissionLib.MultiTargetPermission[](\\n tokenSettings.addr != address(0) ? 4 : 5\\n );\\n\\n // Set permissions to be granted.\\n // Grant the list of permissions of the plugin to the DAO.\\n permissions[0] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPDATE_PLUGIN_SETTINGS_PERMISSION_ID()\\n );\\n\\n permissions[1] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID()\\n );\\n\\n permissions[2] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPGRADE_PLUGIN_PERMISSION_ID()\\n );\\n\\n // Grant `EXECUTE_PERMISSION` of the DAO to the plugin.\\n permissions[3] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n _dao,\\n plugin,\\n PermissionLib.NO_CONDITION,\\n DAO(payable(_dao)).EXECUTE_PERMISSION_ID()\\n );\\n\\n if (tokenSettings.addr == address(0)) {\\n bytes32 tokenMintPermission = GovernanceERC20(token).MINT_PERMISSION_ID();\\n\\n permissions[4] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n token,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n tokenMintPermission\\n );\\n }\\n\\n preparedSetupData.helpers = helpers;\\n preparedSetupData.permissions = permissions;\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function prepareUninstallation(\\n address _dao,\\n SetupPayload calldata _payload\\n ) external view returns (PermissionLib.MultiTargetPermission[] memory permissions) {\\n // Prepare permissions.\\n uint256 helperLength = _payload.currentHelpers.length;\\n if (helperLength != 1) {\\n revert WrongHelpersArrayLength({length: helperLength});\\n }\\n\\n // token can be either GovernanceERC20, GovernanceWrappedERC20, or IVotesUpgradeable, which\\n // does not follow the GovernanceERC20 and GovernanceWrappedERC20 standard.\\n address token = _payload.currentHelpers[0];\\n\\n bool[] memory supportedIds = _getTokenInterfaceIds(token);\\n\\n bool isGovernanceERC20 = supportedIds[0] && supportedIds[1] && !supportedIds[2];\\n\\n permissions = new PermissionLib.MultiTargetPermission[](isGovernanceERC20 ? 5 : 4);\\n\\n // Set permissions to be Revoked.\\n permissions[0] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n _payload.plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPDATE_PLUGIN_SETTINGS_PERMISSION_ID()\\n );\\n\\n permissions[1] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n _payload.plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID()\\n );\\n\\n permissions[2] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n _payload.plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPGRADE_PLUGIN_PERMISSION_ID()\\n );\\n\\n permissions[3] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n _dao,\\n _payload.plugin,\\n PermissionLib.NO_CONDITION,\\n DAO(payable(_dao)).EXECUTE_PERMISSION_ID()\\n );\\n\\n // Revocation of permission is necessary only if the deployed token is GovernanceERC20,\\n // as GovernanceWrapped does not possess this permission. Only return the following\\n // if it's type of GovernanceERC20, otherwise revoking this permission wouldn't have any effect.\\n if (isGovernanceERC20) {\\n permissions[4] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n token,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n GovernanceERC20(token).MINT_PERMISSION_ID()\\n );\\n }\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function implementation() external view virtual override returns (address) {\\n return address(vocdoniVoting);\\n }\\n\\n /// @notice Retrieves the interface identifiers supported by the token contract.\\n /// @dev It is crucial to verify if the provided token address represents a valid contract before using the below.\\n /// @param token The token address\\n function _getTokenInterfaceIds(address token) private view returns (bool[] memory) {\\n bytes4[] memory interfaceIds = new bytes4[](3);\\n interfaceIds[0] = type(IERC20Upgradeable).interfaceId;\\n interfaceIds[1] = type(IVotesUpgradeable).interfaceId;\\n interfaceIds[2] = type(IGovernanceWrappedERC20).interfaceId;\\n return token.getSupportedInterfaces(interfaceIds);\\n }\\n\\n /// @notice Unsatisfiably determines if the contract is an ERC20 token.\\n /// @dev It's important to first check whether token is a contract prior to this call.\\n /// @param token The token address\\n function _isERC20(address token) private view returns (bool) {\\n (bool success, bytes memory data) = token.staticcall(\\n abi.encodeCall(IERC20Upgradeable.balanceOf, (address(this)))\\n );\\n return success && data.length == 0x20;\\n }\\n}\\n\",\"keccak256\":\"0x0fb493e9b24f86fea1969d11c2dfdc3996f0575b4beeb84b8c7f6215cd5a97b9\",\"license\":\"AGPL-3.0-or-later\"}},\"version\":1}", - "bytecode": "0x60e06040523480156200001157600080fd5b50604051620085e3380380620085e38339810160408190526200003491620000af565b6001600160a01b0380831660a052811660c052604051620000559062000088565b604051809103906000f08015801562000072573d6000803e3d6000fd5b506001600160a01b031660805250620000ee9050565b615c6b806200297883390190565b6001600160a01b0381168114620000ac57600080fd5b50565b60008060408385031215620000c357600080fd5b8251620000d08162000096565b6020840151909250620000e38162000096565b809150509250929050565b60805160a05160c05161281d6200015b600039600081816101730152610a2b01526000818160be0152610ada01526000818160fb015281816103d2015281816104cc015281816105c601528181610bb901528181610cfe01528181610de80152610ed2015261281d6000f3fe60806040523480156200001157600080fd5b5060043610620000875760003560e01c80639cb0a12411620000625780639cb0a1241462000120578063a8a9c29e1462000146578063e89b6b91146200016d578063f10832f1146200019557600080fd5b806301ffc9a7146200008c578063599cb1a614620000b85780635c60da1b14620000f9575b600080fd5b620000a36200009d3660046200156e565b620001bc565b60405190151581526020015b60405180910390f35b620000e07f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001620000af565b7f0000000000000000000000000000000000000000000000000000000000000000620000e0565b6200013762000131366004620015cb565b620001f4565b604051620000af919062001686565b6200015d62000157366004620016e6565b62000827565b604051620000af92919062001852565b620000e07f000000000000000000000000000000000000000000000000000000000000000081565b620001ac620001a636600462001884565b6200084f565b604051620000af9291906200190e565b60006001600160e01b0319821663099718b560e41b1480620001ee57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600062000207602084018462001932565b915050600181146200023457604051633c53187f60e21b8152600481018290526024015b60405180910390fd5b600062000245602085018562001932565b600081811062000259576200025962001986565b90506020020160208101906200027091906200199c565b905060006200027f826200112e565b905060008160008151811062000299576200029962001986565b60200260200101518015620002c8575081600181518110620002bf57620002bf62001986565b60200260200101515b8015620002f0575081600281518110620002e657620002e662001986565b6020026020010151155b9050806200030057600462000303565b60055b60ff1667ffffffffffffffff811115620003215762000321620019ba565b6040519080825280602002602001820160405280156200037c57816020015b6040805160a081018252600080825260208083018290529282018190526060820181905260808201528252600019909201910181620003405790505b506040805160a0810190915260018152909550602080820190620003a3908901896200199c565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2c801b66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200042f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004559190620019d0565b815250856000815181106200046e576200046e62001986565b60209081029190910101526040805160a0810190915280600181526020908101906200049d908901896200199c565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e91ddf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000529573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200054f9190620019d0565b8152508560018151811062000568576200056862001986565b60209081029190910101526040805160a08101909152806001815260209081019062000597908901896200199c565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c9c4bfca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000623573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006499190620019d0565b8152508560028151811062000662576200066262001986565b60209081029190910101526040805160a081019091528060018152602001886001600160a01b03168152602001876000016020810190620006a491906200199c565b6001600160a01b0316815260200160006001600160a01b03168152602001886001600160a01b0316630729d0546040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000701573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007279190620019d0565b8152508560038151811062000740576200074062001986565b602002602001018190525080156200081d576040805160a081019091528060018152602001846001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b03168152602001846001600160a01b031663b2d2989c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620007d2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007f89190620019d0565b8152508560048151811062000811576200081162001986565b60200260200101819052505b5050505092915050565b606062000847604051806040016040528060608152602001606081525090565b935093915050565b60006200086f604051806040016040528060608152602001606081525090565b6000808080620008828789018962001d39565b8151604080516001808252818301909252959950939750919550935091600091602080830190803683370190505090506001600160a01b0382161562000ad4576001600160a01b0382163b620008f7576040516318aca2db60e01b81526001600160a01b03831660048201526024016200022b565b620009028262001227565b6200092c5760405163fa8925f160e01b81526001600160a01b03831660048201526024016200022b565b600062000939836200112e565b90508060008151811062000951576200095162001986565b60200260200101511580156200098257508060018151811062000978576200097862001986565b6020026020010151155b8015620009aa575080600281518110620009a057620009a062001986565b6020026020010151155b8062000a1f575080600081518110620009c757620009c762001986565b60200260200101518015620009f7575080600181518110620009ed57620009ed62001986565b6020026020010151155b801562000a1f57508060028151811062000a155762000a1562001986565b6020026020010151155b1562000acd5762000a597f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316620012da565b855160208701516040808901519051639065714760e01b81529396506001600160a01b0387169363906571479362000a98939092909160040162001eb9565b600060405180830381600087803b15801562000ab357600080fd5b505af115801562000ac8573d6000803e3d6000fd5b505050505b5062000b7b565b62000b087f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316620012da565b9150816001600160a01b031663dab27fa98c86602001518760400151876040518563ffffffff1660e01b815260040162000b46949392919062001efb565b600060405180830381600087803b15801562000b6157600080fd5b505af115801562000b76573d6000803e3d6000fd5b505050505b818160008151811062000b925762000b9262001986565b6001600160a01b039283166020918202929092010152821660c086015260405162000c1d907f00000000000000000000000000000000000000000000000000000000000000009062000bed908e908a908a9060240162001fa3565b60408051601f198184030181529190526020810180516001600160e01b031663a727afa360e01b1790526200137d565b84519098506000906001600160a01b031662000c3b57600562000c3e565b60045b60ff1667ffffffffffffffff81111562000c5c5762000c5c620019ba565b60405190808252806020026020018201604052801562000cb757816020015b6040805160a08101825260008082526020808301829052928201819052606082018190526080820152825260001990920191018162000c7b5790505b506040805160a0810190915290915080600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2c801b66040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000d5b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d819190620019d0565b8152508160008151811062000d9a5762000d9a62001986565b60209081029190910101526040805160a0810190915280600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e91ddf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000e45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e6b9190620019d0565b8152508160018151811062000e845762000e8462001986565b60209081029190910101526040805160a0810190915280600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c9c4bfca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000f2f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f559190620019d0565b8152508160028151811062000f6e5762000f6e62001986565b60209081029190910101526040805160a0810190915280600081526020018d6001600160a01b031681526020018a6001600160a01b0316815260200160006001600160a01b031681526020018d6001600160a01b0316630729d0546040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000ff9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200101f9190620019d0565b8152508160038151811062001038576200103862001986565b602090810291909101015284516001600160a01b031662001116576000836001600160a01b031663b2d2989c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001094573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010ba9190620019d0565b6040805160a0810190915290915080600081526001600160a01b0380871660208301528f1660408201526000606082015260800182905282518390600490811062001109576200110962001986565b6020026020010181905250505b90875260208701525094989397509295505050505050565b60408051600380825260808201909252606091600091906020820184803683370190505090506336372b0760e01b8160008151811062001172576200117262001986565b60200260200101906001600160e01b03191690816001600160e01b03191681525050637487d9fb60e11b81600181518110620011b257620011b262001986565b60200260200101906001600160e01b03191690816001600160e01b0319168152505063078984cd60e11b81600281518110620011f257620011f262001986565b6001600160e01b031990921660209283029190910190910152620012206001600160a01b038416826200138b565b9392505050565b604051306024820152600090819081906001600160a01b0385169060440160408051601f198184030181529181526020820180516001600160e01b03166370a0823160e01b179052516200127c9190620020a8565b600060405180830381855afa9150503d8060008114620012b9576040519150601f19603f3d011682016040523d82523d6000602084013e620012be565b606091505b5091509150818015620012d2575080516020145b949350505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b038116620013785760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c65640000000000000000000060448201526064016200022b565b919050565b600062001220838362001461565b60606000825167ffffffffffffffff811115620013ac57620013ac620019ba565b604051908082528060200260200182016040528015620013d6578160200160208202803683370190505b509050620013e4846200149d565b15620012205760005b835181101562001459576200141f8585838151811062001411576200141162001986565b6020026020010151620014d5565b82828151811062001434576200143462001986565b91151560209283029190910190910152806200145081620020c6565b915050620013ed565b509392505050565b60008282604051620014739062001560565b62001480929190620020ee565b604051809103906000f08015801562001459573d6000803e3d6000fd5b6000620014b2826301ffc9a760e01b620014d5565b8015620001ee5750620014ce826001600160e01b0319620014d5565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d9150600051905082801562001548575060208210155b8015620015555750600081115b979650505050505050565b6106fe806200211383390190565b6000602082840312156200158157600080fd5b81356001600160e01b0319811681146200122057600080fd5b80356001600160a01b03811681146200137857600080fd5b600060608284031215620015c557600080fd5b50919050565b60008060408385031215620015df57600080fd5b620015ea836200159a565b9150602083013567ffffffffffffffff8111156200160757600080fd5b6200161585828601620015b2565b9150509250929050565b60008151600381106200164257634e487b7160e01b600052602160045260246000fd5b8352506020818101516001600160a01b0390811691840191909152604080830151821690840152606080830151909116908301526080908101519082015260a00190565b6020808252825182820181905260009190848201906040850190845b81811015620016c757620016b88385516200161f565b938501939250600101620016a2565b50909695505050505050565b803561ffff811681146200137857600080fd5b600080600060608486031215620016fc57600080fd5b62001707846200159a565b92506200171760208501620016d3565b9150604084013567ffffffffffffffff8111156200173457600080fd5b6200174286828701620015b2565b9150509250925092565b60005b83811015620017695781810151838201526020016200174f565b50506000910152565b600081518084526200178c8160208601602086016200174c565b601f01601f19169290920160200192915050565b600081518084526020808501945080840160005b83811015620017db5781516001600160a01b031687529582019590820190600101620017b4565b509495945050505050565b6000815160408452620017fd6040850182620017a0565b60208481015186830387830152805180845290820193509091600091908301905b808310156200184757620018348286516200161f565b915083850194506001830192506200181e565b509695505050505050565b60408152600062001867604083018562001772565b82810360208401526200187b8185620017e6565b95945050505050565b6000806000604084860312156200189a57600080fd5b620018a5846200159a565b9250602084013567ffffffffffffffff80821115620018c357600080fd5b818601915086601f830112620018d857600080fd5b813581811115620018e857600080fd5b876020828501011115620018fb57600080fd5b6020830194508093505050509250925092565b6001600160a01b0383168152604060208201526000620012d26040830184620017e6565b6000808335601e198436030181126200194a57600080fd5b83018035915067ffffffffffffffff8211156200196657600080fd5b6020019150600581901b36038213156200197f57600080fd5b9250929050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620019af57600080fd5b62001220826200159a565b634e487b7160e01b600052604160045260246000fd5b600060208284031215620019e357600080fd5b5051919050565b6040805190810167ffffffffffffffff8111828210171562001a105762001a10620019ba565b60405290565b604051610120810167ffffffffffffffff8111828210171562001a105762001a10620019ba565b604051601f8201601f1916810167ffffffffffffffff8111828210171562001a695762001a69620019ba565b604052919050565b600067ffffffffffffffff82111562001a8e5762001a8e620019ba565b5060051b60200190565b600082601f83011262001aaa57600080fd5b8135602062001ac362001abd8362001a71565b62001a3d565b82815260059290921b8401810191818101908684111562001ae357600080fd5b8286015b84811015620018475762001afb816200159a565b835291830191830162001ae7565b803580151581146200137857600080fd5b803563ffffffff811681146200137857600080fd5b803567ffffffffffffffff811681146200137857600080fd5b600082601f83011262001b5a57600080fd5b813567ffffffffffffffff81111562001b775762001b77620019ba565b62001b8c601f8201601f191660200162001a3d565b81815284602083860101111562001ba257600080fd5b816020850160208301376000918101602001919091529392505050565b60006060828403121562001bd257600080fd5b6040516060810167ffffffffffffffff828210818311171562001bf95762001bf9620019ba565b8160405282935062001c0b856200159a565b8352602085013591508082111562001c2257600080fd5b62001c308683870162001b48565b6020840152604085013591508082111562001c4a57600080fd5b5062001c598582860162001b48565b6040830152505092915050565b60006040828403121562001c7957600080fd5b62001c83620019ea565b9050813567ffffffffffffffff8082111562001c9e57600080fd5b62001cac8583860162001a98565b835260209150818401358181111562001cc457600080fd5b84019050601f8101851362001cd857600080fd5b803562001ce962001abd8262001a71565b81815260059190911b8201830190838101908783111562001d0957600080fd5b928401925b8284101562001d295783358252928401929084019062001d0e565b8085870152505050505092915050565b6000806000806080858703121562001d5057600080fd5b843567ffffffffffffffff8082111562001d6957600080fd5b62001d778883890162001a98565b9550602087013591508082111562001d8e57600080fd5b90860190610120828903121562001da457600080fd5b62001dae62001a16565b62001db98362001b09565b815262001dc960208401620016d3565b602082015262001ddc6040840162001b1a565b604082015262001def6060840162001b1a565b606082015262001e026080840162001b2f565b608082015262001e1560a0840162001b2f565b60a082015262001e2860c084016200159a565b60c082015260e083013560e0820152610100808401358381111562001e4c57600080fd5b62001e5a8b82870162001b48565b82840152505080955050604087013591508082111562001e7957600080fd5b62001e878883890162001bbf565b9350606087013591508082111562001e9e57600080fd5b5062001ead8782880162001c66565b91505092959194509250565b6001600160a01b038416815260606020820152600062001edd606083018562001772565b828103604084015262001ef1818562001772565b9695505050505050565b6001600160a01b03851681526000602060808184015262001f20608084018762001772565b838103604085015262001f34818762001772565b9050838103606085015284516040825262001f536040830182620017a0565b8684015183820393850193909352825180825290840192840191506000905b8082101562001f94578251845292840192918401916001919091019062001f72565b50919998505050505050505050565b6001600160a01b038416815260606020820152600062001fc76060830185620017a0565b8281036040840152835115158152610120602085015162001fee602084018261ffff169052565b50604085015162002007604084018263ffffffff169052565b50606085015162002020606084018263ffffffff169052565b5060808501516200203d608084018267ffffffffffffffff169052565b5060a08501516200205a60a084018267ffffffffffffffff169052565b5060c08501516200207660c08401826001600160a01b03169052565b5060e085015160e08301526101008086015182828501526200209b8385018262001772565b9998505050505050505050565b60008251620020bc8184602087016200174c565b9190910192915050565b600060018201620020e757634e487b7160e01b600052601160045260246000fd5b5060010190565b6001600160a01b0383168152604060208201526000620012d260408301846200177256fe60806040526040516106fe3803806106fe83398101604081905261002291610319565b61002e82826000610035565b5050610436565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106d7602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103e7565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b81526004016101489190610403565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b50506000910152565b6000806040838503121561032c57600080fd5b82516001600160a01b038116811461034357600080fd5b60208401519092506001600160401b038082111561036057600080fd5b818501915085601f83011261037457600080fd5b815181811115610386576103866102df565b604051601f8201601f19908116603f011681019083821181831017156103ae576103ae6102df565b816040528281528860208487010111156103c757600080fd5b6103d88360208301602088016102f5565b80955050505050509250929050565b600082516103f98184602087016102f5565b9190910192915050565b60208152600082518060208401526104228160408501602087016102f5565b601f01601f19169190910160400192915050565b610292806104456000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025f602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061020f565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f919061022b565b60005b838110156102065781810151838201526020016101ee565b50506000910152565b600082516102218184602087016101eb565b9190910192915050565b602081526000825180602084015261024a8160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e7565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051615b4c6200011f60003960008181610c0e01528181610c9301528181610d8601528181610e0b0152610ef10152615b4c6000f3fe6080604052600436106101c25760003560e01c80636a6b2d86116100f7578063c7f758a811610095578063e2c801b611610064578063e2c801b614610523578063e91ddf2f14610557578063f794062e1461058b578063fc5084a5146105ab57600080fd5b8063c7f758a814610488578063c9c4bfca146104bb578063d0fa5a32146104ef578063da35c6641461050e57600080fd5b806386f0e4ed116100d157806386f0e4ed1461040657806398c74ade14610428578063a727afa314610448578063b1bb8d261461046857600080fd5b80636a6b2d86146103a65780636b95da93146103c65780638696552b146103e657600080fd5b80632925e59c1161016457806341de68301161013e57806341de68301461034d5780634f1ef2861461036957806352d1902d1461037c5780635c60da1b1461039157600080fd5b80632925e59c146102c15780633659cfe6146102fb5780634162169f1461031b57600080fd5b80630f525a26116101a05780630f525a261461023e57806318f9dcf01461025e5780632078d4371461028c57806327f1608d146102ac57600080fd5b806301ffc9a7146101c75780630d0d0bcd146101fc5780630d61b5191461021e575b600080fd5b3480156101d357600080fd5b506101e76101e2366004614ac2565b6105cb565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b5061021c610217366004614b0a565b61062c565b005b34801561022a57600080fd5b5061021c610239366004614b3a565b61063a565b34801561024a57600080fd5b5061021c610259366004614c29565b610656565b34801561026a57600080fd5b5061027e610279366004614ece565b610660565b6040519081526020016101f3565b34801561029857600080fd5b5061021c6102a7366004615010565b610b9c565b3480156102b857600080fd5b5061027e610be9565b3480156102cd57600080fd5b5061019154600160401b90046001600160401b03165b6040516001600160401b0390911681526020016101f3565b34801561030757600080fd5b5061021c610316366004615051565b610c04565b34801561032757600080fd5b5060c9546001600160a01b03165b6040516001600160a01b0390911681526020016101f3565b34801561035957600080fd5b5060006040516101f3919061506e565b61021c610377366004615096565b610d7c565b34801561038857600080fd5b5061027e610ee4565b34801561039d57600080fd5b50610335610faa565b3480156103b257600080fd5b5061027e6103c1366004614b3a565b610fe2565b3480156103d257600080fd5b506101e76103e13660046150e5565b610ff0565b3480156103f257600080fd5b5061021c610401366004615010565b611347565b34801561041257600080fd5b5061041b61138a565b6040516101f3919061515a565b34801561043457600080fd5b506101e7610443366004615051565b611502565b34801561045457600080fd5b5061021c610463366004615300565b61150d565b34801561047457600080fd5b506101e761048336600461536f565b611645565b34801561049457600080fd5b506104a86104a3366004614b3a565b611672565b6040516101f39796959493929190615501565b3480156104c757600080fd5b5061027e7f821b6e3a557148015a918c89e5d092e878a69854a2d1a410635f771bd5a8a3f581565b3480156104fb57600080fd5b50610191546001600160401b03166102e3565b34801561051a57600080fd5b5061027e611a2e565b34801561052f57600080fd5b5061027e7f466d2da9531a54b43e3d2bf44c5531ee51046862cbec6aecc512537816c35efe81565b34801561056357600080fd5b5061027e7f014d0f6d145f1740f93075f6c5cea6ecd05f8fc5bd2afca7138cadea84c5d3d781565b34801561059757600080fd5b506101e76105a6366004615051565b611a3a565b3480156105b757600080fd5b5061021c6105c63660046155a6565b611a6f565b60006001600160e01b0319821663bfde735360e01b14806105fc57506001600160e01b0319821663031172f360e41b145b8061061757506001600160e01b03198216630bb5c60360e01b145b80610626575061062682611ab1565b92915050565b6106368282611ad6565b5050565b6106426123bf565b61064a61240d565b6106538161244c565b50565b6106368282612b1a565b600061066a6123bf565b61067261240d565b6040805161012081018252610193805460ff81161515835261010080820461ffff1660208501526301000000820463ffffffff9081169585019590955267010000000000000082049094166060840152600160581b81046001600160401b039081166080850152600160981b9091041660a0830152610194546001600160a01b031660c08301526101955460e0830152610196805460009484019190610717906155da565b80601f0160208091040260200160405190810160405280929190818152602001828054610743906155da565b80156107905780601f1061076557610100808354040283529160200191610790565b820191906000526020600020905b81548152906001019060200180831161077357829003601f168201915b505050505081525050905060006107a43390565b825190915080156107bb57506107b981613214565b155b156107e957604051637ea66a3960e11b81526001600160a01b03821660048201526024015b60405180910390fd5b60e08201511561091b5760c08201516040516309ab24eb60e41b81526001600160a01b0383811660048301526000921690639ab24eb090602401602060405180830381865afa158015610840573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108649190615614565b60c08401516040516370a0823160e01b81526001600160a01b038581166004830152929350600092909116906370a0823190602401602060405180830381865afa1580156108b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108da9190615614565b90508360e00151821080156108f257508360e0015181105b15610918578360e0015160405163240f1c8160e21b81526004016107e091815260200190565b50505b61093285602001518660400151876060015161321f565b6001600160401b0390811660608901529081166040880152166020860152608085015160000361097d578460800151604051635b2ab01360e11b81526004016107e091815260200190565b60006109876133a7565b60008181526101926020908152604091829020600181018c905590890151600382018054938b015160608c01517fffffffffffffffff00000000000000000000000000000000ffffffffffffffff909516600160401b6001600160401b03948516027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1617600160801b918416919091021777ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b9290941691909102929092179091556080880151600482015560a0880151919250906005820190610a699082615673565b5060c08701516006820155610a7d436133c2565b60038201805467ffffffffffffffff19166001600160401b03929092169190911790556002810188905560005b8651811015610b365781600901878281518110610ac957610ac9615732565b602090810291909101810151825460018082018555600094855293839020825160039092020180546001600160a01b0319166001600160a01b03909216919091178155918101519282019290925560408201516002820190610b2b9082615673565b505050600101610aaa565b50826001600160a01b031689837f784842613a953948c527397436300b06839500577a2fe1e958cefafddc9f394f8a602001518b604001518c606001518c8f604051610b86959493929190615748565b60405180910390a450925050505b949350505050565b60c9547f014d0f6d145f1740f93075f6c5cea6ecd05f8fc5bd2afca7138cadea84c5d3d790610bda906001600160a01b031630335b84600036613445565b610be48383613501565b505050565b6000610bf6610160613604565b6001600160e01b0316905090565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c915760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016107e0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610cec7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610d575760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016107e0565b610d608161364c565b6040805160008082526020820190925261065391839190613685565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610e095760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016107e0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610e647f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610ecf5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016107e0565b610ed88261364c565b61063682826001613685565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f845760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016107e0565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b90565b6000610fdd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b600061062661016083613825565b600082815261019260209081526040808320815160e08082018452825460ff1615158252600183015482860152600283015482850152835190810184526003830180546001600160401b038082168452600160401b8204811697840197909752600160801b8104871695830195909552600160c01b9094049094166060858101919091526004830154608086015260058301805461134096939592860193929160a084019161109e906155da565b80601f01602080910402602001604051908101604052809291908181526020018280546110ca906155da565b80156111175780601f106110ec57610100808354040283529160200191611117565b820191906000526020600020905b8154815290600101906020018083116110fa57829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b828210156111bf576000848152602090819020830180546040805182850281018501909152818152928301828280156111ab57602002820191906000526020600020905b815481526020019060010190808311611197575b505050505081526020019060010190611153565b5050505081526020016008820180548060200260200160405190810160405280929190818152602001828054801561122057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611202575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015611332576000848152602090819020604080516060810182526003860290920180546001600160a01b03168352600181015493830193909352600283018054929392918401916112a1906155da565b80601f01602080910402602001604051908101604052809291908181526020018280546112cd906155da565b801561131a5780601f106112ef5761010080835404028352916020019161131a565b820191906000526020600020905b8154815290600101906020018083116112fd57829003601f168201915b5050505050815250508152602001906001019061124e565b5050505081525050836138d8565b9392505050565b60c9547f014d0f6d145f1740f93075f6c5cea6ecd05f8fc5bd2afca7138cadea84c5d3d790611380906001600160a01b03163033610bd1565b610be4838361393b565b604080516101208101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201929092526101008101919091526040805161012081018252610193805460ff81161515835261010080820461ffff1660208501526301000000820463ffffffff9081169585019590955267010000000000000082049094166060840152600160581b81046001600160401b039081166080850152600160981b9091041660a0830152610194546001600160a01b031660c08301526101955460e08301526101968054929391929184019161147b906155da565b80601f01602080910402602001604051908101604052809291908181526020018280546114a7906155da565b80156114f45780601f106114c9576101008083540402835291602001916114f4565b820191906000526020600020905b8154815290600101906020018083116114d757829003601f168201915b505050505081525050905090565b600061062682613214565b600054610100900460ff161580801561152d5750600054600160ff909116105b806115475750303b158015611547575060005460ff166001145b6115b95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107e0565b6000805460ff1916600117905580156115dc576000805461ff0019166101001790555b6115e585613a13565b6115ef848461393b565b6115f882613a87565b801561163e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b038216600090815261015f602052604081206116689083613825565b6001149392505050565b6040805160e08101825260008082526020820181905291810182905260608181018390526080820183905260a0820181905260c08201839052908290600085815261019260209081526040808320815160e08082018452825460ff1615158252600183015482860152600283015482850152835190810184526003830180546001600160401b038082168452600160401b8204811697840197909752600160801b8104871695830195909552600160c01b90940490941660608581019190915260048301546080860152600583018054919586958895938588019360a084019161175b906155da565b80601f0160208091040260200160405190810160405280929190818152602001828054611787906155da565b80156117d45780601f106117a9576101008083540402835291602001916117d4565b820191906000526020600020905b8154815290600101906020018083116117b757829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b8282101561187c5760008481526020908190208301805460408051828502810185019091528181529283018282801561186857602002820191906000526020600020905b815481526020019060010190808311611854575b505050505081526020019060010190611810565b505050508152602001600882018054806020026020016040519081016040528092919081815260200182805480156118dd57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116118bf575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b828210156119ef576000848152602090819020604080516060810182526003860290920180546001600160a01b031683526001810154938301939093526002830180549293929184019161195e906155da565b80601f016020809104026020016040519081016040528092919081815260200182805461198a906155da565b80156119d75780601f106119ac576101008083540402835291602001916119d7565b820191906000526020600020905b8154815290600101906020018083116119ba57829003601f168201915b5050505050815250508152602001906001019061190b565b50505091525050805160a0820151602083015160608401516040850151608086015160c090960151949f939e50919c509a509850919650945092505050565b6000610fdd61012d5490565b6001600160a01b038116600090815261015f60205260408120611a5c90613604565b6001600160e01b03166001149050919050565b60c9547f466d2da9531a54b43e3d2bf44c5531ee51046862cbec6aecc512537816c35efe90611aa8906001600160a01b03163033610bd1565b61063682613a87565b60006001600160e01b0319821663368d719960e21b1480610626575061062682613e69565b611ade6123bf565b611ae661240d565b33611af081613214565b611b1857604051637ea66a3960e11b81526001600160a01b03821660048201526024016107e0565b6000838152610192602052604081206007810154909103611b515780600701604051630e3d24e160e31b81526004016107e0919061578e565b6040805160e08082018352835460ff16151582526001840154602080840191909152600285015483850152835191820184526003850180546001600160401b038082168552600160401b8204811693850193909352600160801b8104831695840195909552600160c01b9094041660608281019190915260048501546080830152600585018054611e889587949386019392909160a084019190611bf4906155da565b80601f0160208091040260200160405190810160405280929190818152602001828054611c20906155da565b8015611c6d5780601f10611c4257610100808354040283529160200191611c6d565b820191906000526020600020905b815481529060010190602001808311611c5057829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b82821015611d1557600084815260209081902083018054604080518285028101850190915281815292830182828015611d0157602002820191906000526020600020905b815481526020019060010190808311611ced575b505050505081526020019060010190611ca9565b50505050815260200160088201805480602002602001604051908101604052809291908181526020018280548015611d7657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d58575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015611332576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101549383019390935260028301805492939291840191611df7906155da565b80601f0160208091040260200160405190810160405280929190818152602001828054611e23906155da565b8015611e705780601f10611e4557610100808354040283529160200191611e70565b820191906000526020600020905b815481529060010190602001808311611e5357829003601f168201915b50505050508152505081526020019060010190611da4565b15611eb157604051633f4fdb5960e11b81526001600160a01b03831660048201526024016107e0565b61019354600882015461010090910461ffff1611611efd57600881015461019354604051631906bddf60e01b81526004810192909252610100900461ffff1660248201526044016107e0565b6101915460038201546001600160401b03600160401b90920482169116101561234d576040805160008082526020820190925290805b6008840154811015612305576000846008018281548110611f5657611f56615732565b6000918252602090912001546001600160a01b03169050611f7681613214565b80156122c257506040805160e08082018352875460ff16151582526001880154602080840191909152600289015483850152835191820184526003890180546001600160401b038082168552600160401b8204811693850193909352600160801b8104831695840195909552600160c01b90940416606082810191909152600489015460808301526005890180546122c2958b949386019392909160a084019190612020906155da565b80601f016020809104026020016040519081016040528092919081815260200182805461204c906155da565b80156120995780601f1061206e57610100808354040283529160200191612099565b820191906000526020600020905b81548152906001019060200180831161207c57829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b828210156121415760008481526020908190208301805460408051828502810185019091528181529283018282801561212d57602002820191906000526020600020905b815481526020019060010190808311612119575b5050505050815260200190600101906120d5565b505050508152602001600882018054806020026020016040519081016040528092919081815260200182805480156121a257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612184575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b828210156122b4576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101549383019390935260028301805492939291840191612223906155da565b80601f016020809104026020016040519081016040528092919081815260200182805461224f906155da565b801561229c5780601f106122715761010080835404028352916020019161229c565b820191906000526020600020905b81548152906001019060200180831161227f57829003601f168201915b505050505081525050815260200190600101906121d0565b5050505081525050826138d8565b156122fc5780848460ff16815181106122dd576122dd615732565b6001600160a01b03909216602092830291909101909101526001909201915b50600101611f33565b50815161231b906008850190602085019061497d565b505061019154600383018054600160401b9092046001600160401b031667ffffffffffffffff19909216919091179055505b6008810180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038516908117909155604051909186917fbf7dc1f4fd16c6ebda24e12c87e844c6ed685370ba1db171486350a7d57ae7659190a382156123b9576123b98461244c565b50505050565b610191546001600160401b03438116600160401b909204160361240b5761019154604051631b1cad2160e21b8152600160401b9091046001600160401b031660048201526024016107e0565b565b610191546001600160401b0343811691160361240b5761019154604051635f7f727960e01b81526001600160401b0390911660048201526024016107e0565b600081815261019260209081526040808320815160e08082018452825460ff1615158252600183015482860152600283015482850152835190810184526003830180546001600160401b038082168452600160401b8204811697840197909752600160801b8104871695830195909552600160c01b9094049094166060858101919091526004830154608086015260058301805492959394918601939260a0840191906124f8906155da565b80601f0160208091040260200160405190810160405280929190818152602001828054612524906155da565b80156125715780601f1061254657610100808354040283529160200191612571565b820191906000526020600020905b81548152906001019060200180831161255457829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b828210156126195760008481526020908190208301805460408051828502810185019091528181529283018282801561260557602002820191906000526020600020905b8154815260200190600101908083116125f1575b5050505050815260200190600101906125ad565b5050505081526020016008820180548060200260200160405190810160405280929190818152602001828054801561267a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161265c575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b8282101561278c576000848152602090819020604080516060810182526003860290920180546001600160a01b03168352600181015493830193909352600283018054929392918401916126fb906155da565b80601f0160208091040260200160405190810160405280929190818152602001828054612727906155da565b80156127745780601f1061274957610100808354040283529160200191612774565b820191906000526020600020905b81548152906001019060200180831161275757829003601f168201915b505050505081525050815260200190600101906126a8565b505050915250508051909150156127b957604051632776407360e11b8152600481018390526024016107e0565b8060800151516000036127e5578060800151604051630e3d24e160e31b81526004016107e0919061581c565b428160600151606001516001600160401b0316101561283f5760608082015160408082015191909201519151624b94ed60e01b81526001600160401b039182166004820152911660248201524260448201526064016107e0565b6101935460a08201515161010090910461ffff1611156128a35761019360000160019054906101000a900461ffff1661287c8260a0015151613eb9565b60405163b5d6b86760e01b815261ffff9283166004820152911660248201526044016107e0565b600081608001516000815181106128bc576128bc615732565b60200260200101516002815181106128d6576128d6615732565b602002602001015182608001516000815181106128f5576128f5615732565b602002602001015160018151811061290f5761290f615732565b6020026020010151836080015160008151811061292e5761292e615732565b602002602001015160008151811061294857612948615732565b602002602001015161295a9190615845565b6129649190615845565b6060830151608001516101935491925060009161298e91906301000000900463ffffffff16613f33565b9050818111156129bb57604051630e56c8f360e11b815260048101839052602481018290526044016107e0565b600083608001516000815181106129d4576129d4615732565b60200260200101516000815181106129ee576129ee615732565b602090810291909101015161019354612a1b90670100000000000000900463ffffffff16620f4240615858565b612a25919061586b565b905060008460800151600081518110612a4057612a40615732565b6020026020010151600181518110612a5a57612a5a615732565b602090810291909101015161019354612a849190670100000000000000900463ffffffff1661586b565b9050808211612ad157612a9a8560800151613faa565b61019354604051631f68fd8160e31b81526004810192909252670100000000000000900463ffffffff1660248201526044016107e0565b600086815261019260205260409020805460ff19166001179055612b10612b0060c9546001600160a01b031690565b878760c00151886040015161406d565b5050505050505050565b612b226123bf565b612b2a61240d565b33612b3481613214565b612b5c57604051637ea66a3960e11b81526001600160a01b03821660048201526024016107e0565b600083815261019260205260409020805460ff1615612b9157604051632776407360e11b8152600481018590526024016107e0565b6040805160e08082018352835460ff16151582526001840154602080840191909152600285015483850152835191820184526003850180546001600160401b038082168552600160401b8204811693850193909352600160801b8104831695840195909552600160c01b9094041660608281019190915260048501546080830152600585018054612ed59587949386019392909160a084019190612c34906155da565b80601f0160208091040260200160405190810160405280929190818152602001828054612c60906155da565b8015612cad5780601f10612c8257610100808354040283529160200191612cad565b820191906000526020600020905b815481529060010190602001808311612c9057829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b82821015612d5557600084815260209081902083018054604080518285028101850190915281815292830182828015612d4157602002820191906000526020600020905b815481526020019060010190808311612d2d575b505050505081526020019060010190612ce9565b50505050815260200160088201805480602002602001604051908101604052809291908181526020018280548015612db657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612d98575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015612ec8576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101549383019390935260028301805492939291840191612e37906155da565b80601f0160208091040260200160405190810160405280929190818152602001828054612e63906155da565b8015612eb05780601f10612e8557610100808354040283529160200191612eb0565b820191906000526020600020905b815481529060010190602001808311612e9357829003601f168201915b50505050508152505081526020019060010190612de4565b5050505081525050614123565b612f1e576003810154604051624b94ed60e01b81526001600160401b03600160801b830481166004830152600160c01b90920490911660248201524260448201526064016107e0565b82516001141580612f4b575082600081518110612f3d57612f3d615732565b602002602001015151600314155b15612f6b5782604051630e3d24e160e31b81526004016107e0919061581c565b6007810154156131585761019354600882015461010090910461ffff1611612fc157600881015461019354604051631906bddf60e01b81526004810192909252610100900461ffff1660248201526044016107e0565b80600701600081548110612fd757612fd7615732565b90600052602060002001600081548110612ff357612ff3615732565b90600052602060002001548360008151811061301157613011615732565b602002602001015160008151811061302b5761302b615732565b60200260200101511480156130af57508060070160008154811061305157613051615732565b9060005260206000200160018154811061306d5761306d615732565b90600052602060002001548360008151811061308b5761308b615732565b60200260200101516001815181106130a5576130a5615732565b6020026020010151145b801561312a5750806007016000815481106130cc576130cc615732565b906000526020600020016002815481106130e8576130e8615732565b90600052602060002001548360008151811061310657613106615732565b602002602001015160028151811061312057613120615732565b6020026020010151145b1561314a5782604051630e3d24e160e31b81526004016107e0919061581c565b6131586008820160006149de565b825161316d90600783019060208601906149fc565b50600881018054600181018255600091825260209091200180546001600160a01b0319166001600160a01b03841617905560405184907fb0441bed37ecf9efe628cbd58a2cff7c1289f751684f259fde3968a92f23107b906131d090869061581c565b60405180910390a26040516001600160a01b0383169085907fbf7dc1f4fd16c6ebda24e12c87e844c6ed685370ba1db171486350a7d57ae76590600090a350505050565b600061062682611a3a565b60008060008061322e426133c2565b9050866001600160401b031660000361324957809350613292565b869350806001600160401b0316846001600160401b03161015613292576040516335477cb960e11b81526001600160401b038083166004830152851660248201526044016107e0565b610193546000906132b390600160581b90046001600160401b031686615882565b9050866001600160401b03166000036132ce57809350613317565b869350806001600160401b0316846001600160401b031610156133175760405163229736a160e01b81526001600160401b038083166004830152851660248201526044016107e0565b6101935460009061333890600160981b90046001600160401b031686615882565b9050866001600160401b03166000036133535780935061339b565b869350806001600160401b0316846001600160401b0316101561339b5760405162e0e64960e71b81526001600160401b038083166004830152851660248201526044016107e0565b50505093509350939050565b60006133b1611a2e565b9050610fa761012d80546001019055565b60006001600160401b038211156134415760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201527f342062697473000000000000000000000000000000000000000000000000000060648201526084016107e0565b5090565b604051637ef7c88360e11b81526001600160a01b0387169063fdef91069061347990889088908890889088906004016158a2565b602060405180830381865afa158015613496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ba91906158f6565b6134f957604051630cb6f8ed60e21b81526001600160a01b038088166004830152808716602483015285166044820152606481018490526084016107e0565b505050505050565b6135096123bf565b600081900361352e5760405163148007c560e31b8152600481018290526024016107e0565b600081613539610be9565b6135439190615858565b6101935490915061ffff6101009091048116908216101561359057610193546040516317b10ead60e11b815261ffff808416600483015261010090920490911660248201526044016107e0565b61359a83836141a8565b61019180546fffffffffffffffff00000000000000001916600160401b436001600160401b0316021790556040517ff19a206b69ff20c612548bba639decadefe80ed2e7bf1a6fdc18dcde91e06e09906135f79085908590615913565b60405180910390a1505050565b805460009080156136435761362c8361361e600184615858565b600091825260209091200190565b5464010000000090046001600160e01b0316611340565b60009392505050565b60c9547f821b6e3a557148015a918c89e5d092e878a69854a2d1a410635f771bd5a8a3f590610636906001600160a01b03163033610bd1565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156136b857610be483614297565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613712575060408051601f3d908101601f1916820190925261370f91810190615614565b60015b6137845760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016107e0565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146138195760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c6555554944000000000000000000000000000000000000000000000060648201526084016107e0565b50610be4838383614355565b60004382106138765760405162461bcd60e51b815260206004820181905260248201527f436865636b706f696e74733a20626c6f636b206e6f7420796574206d696e656460448201526064016107e0565b60006138818361437a565b84549091506000613894868483856143f6565b905080156138c2576138ab8661361e600184615858565b5464010000000090046001600160e01b03166138c5565b60005b6001600160e01b03169695505050505050565b6000805b8360a001515181101561393157826001600160a01b03168460a00151828151811061390957613909615732565b60200260200101516001600160a01b031603613929576001915050610626565b6001016138dc565b5060009392505050565b6139436123bf565b60008190036139685760405163148007c560e31b8152600481018290526024016107e0565b600081613973610be9565b61397d9190615845565b905061ffff8111156139ac5760405162496b8d60e61b815261ffff6004820152602481018290526044016107e0565b6139b68383614454565b61019180546fffffffffffffffff00000000000000001916600160401b436001600160401b0316021790556040517f16fc0d8d129e5d736ba1c955c298986a94cb8475c77b7184fa6cda49be4bafe5906135f79085908590615913565b600054610100900460ff16613a7e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016107e0565b610653816144c1565b613a8f61240d565b613a9d6001620f4240615858565b816060015163ffffffff161115613ae957613abc6001620f4240615858565b606082015160405163cc80c19560e01b8152600481019290925263ffffffff1660248201526044016107e0565b620f4240816040015163ffffffff161115613b2e57604080820151905163cc80c19560e01b8152620f4240600482015263ffffffff90911660248201526044016107e0565b6301e1338081608001516001600160401b03161115613b7b576080810151604051632b6ba48f60e21b81526301e1338060048201526001600160401b0390911660248201526044016107e0565b61012c81608001516001600160401b03161015613bc4576080810151604051632b6ba48f60e21b8152610e1060048201526001600160401b0390911660248201526044016107e0565b6301e133808160a001516001600160401b03161115613c115760a0810151604051630ba3bbab60e41b81526301e1338060048201526001600160401b0390911660248201526044016107e0565b61012c8160a001516001600160401b03161015613c5a5760a0810151604051630ba3bbab60e41b8152610e1060048201526001600160401b0390911660248201526044016107e0565b80516101938054602084015160408501516060860151608087015160a088015162ffffff1990951696151562ffff0019169690961761010061ffff9094168402176affffffffffffffff0000001916630100000063ffffffff938416026affffffff000000000000001916176701000000000000009290911691909102177fffffffffff00000000000000000000000000000000ffffffffffffffffffffff16600160581b6001600160401b03958616027fffffffffff0000000000000000ffffffffffffffffffffffffffffffffffffff1617600160981b949092169390930217815560c083015161019480546001600160a01b0319166001600160a01b0390921691909117905560e0830151610195559082015182919061019690613d819082615673565b5050610191805467ffffffffffffffff1916436001600160401b031617905550610100810151604051613db49190615956565b60405180910390208160c001516001600160a01b0316826020015161ffff167f823fd5f3f4ef81d34c23b76dc23575af42c26dbd47f3d42bb4bba0a8246d230b84600001518560400151866060015187608001518860a001518960e00151604051613e5e96959493929190951515865263ffffffff94851660208701529290931660408501526001600160401b03908116606085015291909116608083015260a082015260c00190565b60405180910390a450565b60006001600160e01b0319821663041de68360e41b1480613e9a57506001600160e01b031982166352d1902d60e01b145b8061062657506301ffc9a760e01b6001600160e01b0319831614610626565b600061ffff8211156134415760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f362062697473000000000000000000000000000000000000000000000000000060648201526084016107e0565b6000620f4240821115613f655760405163cc80c19560e01b8152620f42406004820152602481018390526044016107e0565b613f6f828461586b565b92506000613f80620f424085615988565b9050613f8f620f42408561599c565b91508015613fa357613fa0826159b0565b91505b5092915050565b600081600081518110613fbf57613fbf615732565b6020026020010151600181518110613fd957613fd9615732565b602002602001015182600081518110613ff457613ff4615732565b602002602001015160008151811061400e5761400e615732565b60200260200101516140209190615845565b620f42408360008151811061403757614037615732565b602002602001015160008151811061405157614051615732565b6020026020010151614063919061586b565b610626919061599c565b6040516331c6fcc960e21b81526060906000906001600160a01b0387169063c71bf324906140a3908890889088906004016159c9565b6000604051808303816000875af11580156140c2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526140ea91908101906159f2565b604051919350915085907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a294509492505050565b600080429050806001600160401b03168360600151602001516001600160401b03161080156141755750614158600182615ae5565b6001600160401b03168360600151604001516001600160401b0316105b801561419a5750806001600160401b03168360600151606001516001600160401b0316115b156136435750600192915050565b60005b81811015614287576141dd8383838181106141c8576141c8615732565b90506020020160208101906105a69190615051565b61422d578282828181106141f3576141f3615732565b90506020020160208101906142089190615051565b60405163c0b7477d60e01b81526001600160a01b0390911660048201526024016107e0565b61427d600061015f600086868681811061424957614249615732565b905060200201602081019061425e9190615051565b6001600160a01b0316815260208101919091526040016000209061454e565b50506001016141ab565b506123b961016061458483614589565b6001600160a01b0381163b6143145760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016107e0565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b61435e836145c1565b60008251118061436b5750805b15610be4576123b98383614601565b600063ffffffff8211156134415760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201527f322062697473000000000000000000000000000000000000000000000000000060648201526084016107e0565b60005b8183101561444c57600061440d8484614626565b60008781526020902090915063ffffffff86169082015463ffffffff16111561443857809250614446565b614443816001615845565b93505b506143f9565b509392505050565b60005b818110156144b1576144748383838181106141c8576141c8615732565b1561448b578282828181106141f3576141f3615732565b6144a7600161015f600086868681811061424957614249615732565b5050600101614457565b506123b961016061464183614589565b600054610100900460ff1661452c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016107e0565b60c980546001600160a01b0319166001600160a01b0392909216919091179055565b60008061456c8461455e4361437a565b61456786614645565b6146c4565b6001600160e01b0391821693501690505b9250929050565b900390565b6000806145b4856145af61459c88613604565b6001600160e01b0316868863ffffffff16565b61454e565b915091505b935093915050565b6145ca81614297565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606113408383604051806060016040528060278152602001615b1960279139614867565b6000614635600284841861599c565b61134090848416615845565b0190565b60006001600160e01b038211156134415760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203260448201527f323420626974730000000000000000000000000000000000000000000000000060648201526084016107e0565b82546000908190801561480d5760006146e28761361e600185615858565b60408051808201909152905463ffffffff8082168084526401000000009092046001600160e01b0316602084015291925090871610156147645760405162461bcd60e51b815260206004820152601b60248201527f436865636b706f696e743a2064656372656173696e67206b657973000000000060448201526064016107e0565b805163ffffffff8088169116036147ad57846147858861361e600186615858565b80546001600160e01b03929092166401000000000263ffffffff9092169190911790556147fd565b6040805180820190915263ffffffff80881682526001600160e01b0380881660208085019182528b54600181018d5560008d81529190912094519151909216640100000000029216919091179101555b6020015192508391506145b99050565b50506040805180820190915263ffffffff80851682526001600160e01b0380851660208085019182528854600181018a5560008a8152918220955192519093166401000000000291909316179201919091559050816145b9565b6060600080856001600160a01b0316856040516148849190615956565b600060405180830381855af49150503d80600081146148bf576040519150601f19603f3d011682016040523d82523d6000602084013e6148c4565b606091505b50915091506148d5868383876148df565b9695505050505050565b6060831561494e578251600003614947576001600160a01b0385163b6149475760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107e0565b5081610b94565b610b9483838151156149635781518083602001fd5b8060405162461bcd60e51b81526004016107e09190615b05565b8280548282559060005260206000209081019282156149d2579160200282015b828111156149d257825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061499d565b50613441929150614a55565b50805460008255906000526020600020908101906106539190614a55565b828054828255906000526020600020908101928215614a49579160200282015b82811115614a495782518051614a39918491602090910190614a6a565b5091602001919060010190614a1c565b50613441929150614aa5565b5b808211156134415760008155600101614a56565b8280548282559060005260206000209081019282156149d2579160200282015b828111156149d2578251825591602001919060010190614a8a565b80821115613441576000614ab982826149de565b50600101614aa5565b600060208284031215614ad457600080fd5b81356001600160e01b03198116811461134057600080fd5b801515811461065357600080fd5b8035614b0581614aec565b919050565b60008060408385031215614b1d57600080fd5b823591506020830135614b2f81614aec565b809150509250929050565b600060208284031215614b4c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614b8b57614b8b614b53565b60405290565b60405160e081016001600160401b0381118282101715614b8b57614b8b614b53565b60405161012081016001600160401b0381118282101715614b8b57614b8b614b53565b604051601f8201601f191681016001600160401b0381118282101715614bfe57614bfe614b53565b604052919050565b60006001600160401b03821115614c1f57614c1f614b53565b5060051b60200190565b6000806040808486031215614c3d57600080fd5b833592506020808501356001600160401b0380821115614c5c57600080fd5b818701915087601f830112614c7057600080fd5b8135614c83614c7e82614c06565b614bd6565b81815260059190911b8301840190848101908a831115614ca257600080fd5b8585015b83811015614d2e57803585811115614cbe5760008081fd5b8601603f81018d13614cd05760008081fd5b87810135614ce0614c7e82614c06565b81815260059190911b82018a0190898101908f831115614d005760008081fd5b928b01925b82841015614d1e5783358252928a0192908a0190614d05565b8652505050918601918601614ca6565b50809750505050505050509250929050565b80356001600160401b0381168114614b0557600080fd5b60006001600160401b03821115614d7057614d70614b53565b50601f01601f191660200190565b600082601f830112614d8f57600080fd5b8135614d9d614c7e82614d57565b818152846020838601011115614db257600080fd5b816020850160208301376000918101602001919091529392505050565b6001600160a01b038116811461065357600080fd5b8035614b0581614dcf565b600082601f830112614e0057600080fd5b81356020614e10614c7e83614c06565b82815260059290921b84018101918181019086841115614e2f57600080fd5b8286015b84811015614ec35780356001600160401b0380821115614e535760008081fd5b908801906060828b03601f1901811315614e6d5760008081fd5b614e75614b69565b87840135614e8281614dcf565b815260408481013589830152918401359183831115614ea15760008081fd5b614eaf8d8a85880101614d7e565b908201528652505050918301918301614e33565b509695505050505050565b60008060008060808587031215614ee457600080fd5b843593506020850135925060408501356001600160401b0380821115614f0957600080fd5b9086019060e08289031215614f1d57600080fd5b614f25614b91565b614f2e83614d40565b8152614f3c60208401614d40565b6020820152614f4d60408401614d40565b6040820152614f5e60608401614d40565b60608201526080830135608082015260a083013582811115614f7f57600080fd5b614f8b8a828601614d7e565b60a08301525060c083013560c0820152809450506060870135915080821115614fb357600080fd5b50614fc087828801614def565b91505092959194509250565b60008083601f840112614fde57600080fd5b5081356001600160401b03811115614ff557600080fd5b6020830191508360208260051b850101111561457d57600080fd5b6000806020838503121561502357600080fd5b82356001600160401b0381111561503957600080fd5b61504585828601614fcc565b90969095509350505050565b60006020828403121561506357600080fd5b813561134081614dcf565b602081016003831061509057634e487b7160e01b600052602160045260246000fd5b91905290565b600080604083850312156150a957600080fd5b82356150b481614dcf565b915060208301356001600160401b038111156150cf57600080fd5b6150db85828601614d7e565b9150509250929050565b600080604083850312156150f857600080fd5b823591506020830135614b2f81614dcf565b60005b8381101561512557818101518382015260200161510d565b50506000910152565b6000815180845261514681602086016020860161510a565b601f01601f19169290920160200192915050565b6020815261516d60208201835115159052565b60006020830151615184604084018261ffff169052565b50604083015163ffffffff8116606084015250606083015163ffffffff811660808401525060808301516001600160401b03811660a08401525060a08301516001600160401b03811660c08401525060c08301516001600160a01b03811660e08401525060e08301516101008381019190915283015161012080840152613fa061014084018261512e565b803561ffff81168114614b0557600080fd5b803563ffffffff81168114614b0557600080fd5b6000610120828403121561524857600080fd5b615250614bb3565b905061525b82614afa565b81526152696020830161520f565b602082015261527a60408301615221565b604082015261528b60608301615221565b606082015261529c60808301614d40565b60808201526152ad60a08301614d40565b60a08201526152be60c08301614de4565b60c082015260e082013560e0820152610100808301356001600160401b038111156152e857600080fd5b6152f485828601614d7e565b82840152505092915050565b6000806000806060858703121561531657600080fd5b843561532181614dcf565b935060208501356001600160401b038082111561533d57600080fd5b61534988838901614fcc565b9095509350604087013591508082111561536257600080fd5b50614fc087828801615235565b6000806040838503121561538257600080fd5b823561538d81614dcf565b946020939093013593505050565b60006001600160401b03808351168452806020840151166020850152806040840151166040850152806060840151166060850152506080820151608084015260a082015160e060a08501526153f360e085018261512e565b60c093840151949093019390935250919050565b600081518084526020808501808196508360051b810191508286016000805b86811015615475578385038a52825180518087529087019087870190845b8181101561546057835183529289019291890191600101615444565b50509a87019a95505091850191600101615426565b509298975050505050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156154f4578284038952815180516001600160a01b0316855285810151868601526040908101516060918601829052906154e08187018361512e565b9a87019a95505050908401906001016154a1565b5091979650505050505050565b600060e082018915158352602060e081850152818a5180845261010086019150828c01935060005b8181101561554e5784516001600160a01b031683529383019391830191600101615529565b50508960408601528481036060860152615568818a61539b565b9250505085608084015282810360a08401526155848186615407565b905082810360c08401526155988185615483565b9a9950505050505050505050565b6000602082840312156155b857600080fd5b81356001600160401b038111156155ce57600080fd5b613fa084828501615235565b600181811c908216806155ee57607f821691505b60208210810361560e57634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561562657600080fd5b5051919050565b601f821115610be457600081815260208120601f850160051c810160208610156156545750805b601f850160051c820191505b818110156134f957828155600101615660565b81516001600160401b0381111561568c5761568c614b53565b6156a08161569a84546155da565b8461562d565b602080601f8311600181146156d557600084156156bd5750858301515b600019600386901b1c1916600185901b1785556134f9565b600085815260208120601f198616915b82811015615704578886015182559484019460019091019084016156e5565b50858210156157225787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b038088168352808716602084015280861660408401525060a0606083015261577c60a0830185615483565b90508260808301529695505050505050565b6000602080830181845280855480835260408601915060408160051b87010192506000878152848120815b8381101561580e57888603603f1901855281548087528284528784208888019190855b828110156157f85781548452928a0192600191820191016157dc565b50919750505093860193600191820191016157b9565b509398975050505050505050565b6020815260006113406020830184615407565b634e487b7160e01b600052601160045260246000fd5b808201808211156106265761062661582f565b818103818111156106265761062661582f565b80820281158282048414176106265761062661582f565b6001600160401b03818116838216019080821115613fa357613fa361582f565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b60006020828403121561590857600080fd5b815161134081614aec565b60208082528181018390526000908460408401835b86811015614ec357823561593b81614dcf565b6001600160a01b031682529183019190830190600101615928565b6000825161596881846020870161510a565b9190910192915050565b634e487b7160e01b600052601260045260246000fd5b60008261599757615997615972565b500690565b6000826159ab576159ab615972565b500490565b6000600182016159c2576159c261582f565b5060010190565b8381526060602082015260006159e26060830185615483565b9050826040830152949350505050565b6000806040808486031215615a0657600080fd5b83516001600160401b0380821115615a1d57600080fd5b818601915086601f830112615a3157600080fd5b81516020615a41614c7e83614c06565b82815260059290921b8401810191818101908a841115615a6057600080fd5b8286015b84811015615ad157805186811115615a7c5760008081fd5b8701603f81018d13615a8e5760008081fd5b84810151615a9e614c7e82614d57565b8181528e8b838501011115615ab35760008081fd5b615ac2828883018d860161510a565b85525050918301918301615a64565b509890910151979997985050505050505050565b6001600160401b03828116828216039080821115613fa357613fa361582f565b602081526000611340602083018461512e56fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a", - "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000875760003560e01c80639cb0a12411620000625780639cb0a1241462000120578063a8a9c29e1462000146578063e89b6b91146200016d578063f10832f1146200019557600080fd5b806301ffc9a7146200008c578063599cb1a614620000b85780635c60da1b14620000f9575b600080fd5b620000a36200009d3660046200156e565b620001bc565b60405190151581526020015b60405180910390f35b620000e07f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001620000af565b7f0000000000000000000000000000000000000000000000000000000000000000620000e0565b6200013762000131366004620015cb565b620001f4565b604051620000af919062001686565b6200015d62000157366004620016e6565b62000827565b604051620000af92919062001852565b620000e07f000000000000000000000000000000000000000000000000000000000000000081565b620001ac620001a636600462001884565b6200084f565b604051620000af9291906200190e565b60006001600160e01b0319821663099718b560e41b1480620001ee57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600062000207602084018462001932565b915050600181146200023457604051633c53187f60e21b8152600481018290526024015b60405180910390fd5b600062000245602085018562001932565b600081811062000259576200025962001986565b90506020020160208101906200027091906200199c565b905060006200027f826200112e565b905060008160008151811062000299576200029962001986565b60200260200101518015620002c8575081600181518110620002bf57620002bf62001986565b60200260200101515b8015620002f0575081600281518110620002e657620002e662001986565b6020026020010151155b9050806200030057600462000303565b60055b60ff1667ffffffffffffffff811115620003215762000321620019ba565b6040519080825280602002602001820160405280156200037c57816020015b6040805160a081018252600080825260208083018290529282018190526060820181905260808201528252600019909201910181620003405790505b506040805160a0810190915260018152909550602080820190620003a3908901896200199c565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2c801b66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200042f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004559190620019d0565b815250856000815181106200046e576200046e62001986565b60209081029190910101526040805160a0810190915280600181526020908101906200049d908901896200199c565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e91ddf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000529573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200054f9190620019d0565b8152508560018151811062000568576200056862001986565b60209081029190910101526040805160a08101909152806001815260209081019062000597908901896200199c565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c9c4bfca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000623573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006499190620019d0565b8152508560028151811062000662576200066262001986565b60209081029190910101526040805160a081019091528060018152602001886001600160a01b03168152602001876000016020810190620006a491906200199c565b6001600160a01b0316815260200160006001600160a01b03168152602001886001600160a01b0316630729d0546040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000701573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007279190620019d0565b8152508560038151811062000740576200074062001986565b602002602001018190525080156200081d576040805160a081019091528060018152602001846001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b03168152602001846001600160a01b031663b2d2989c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620007d2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007f89190620019d0565b8152508560048151811062000811576200081162001986565b60200260200101819052505b5050505092915050565b606062000847604051806040016040528060608152602001606081525090565b935093915050565b60006200086f604051806040016040528060608152602001606081525090565b6000808080620008828789018962001d39565b8151604080516001808252818301909252959950939750919550935091600091602080830190803683370190505090506001600160a01b0382161562000ad4576001600160a01b0382163b620008f7576040516318aca2db60e01b81526001600160a01b03831660048201526024016200022b565b620009028262001227565b6200092c5760405163fa8925f160e01b81526001600160a01b03831660048201526024016200022b565b600062000939836200112e565b90508060008151811062000951576200095162001986565b60200260200101511580156200098257508060018151811062000978576200097862001986565b6020026020010151155b8015620009aa575080600281518110620009a057620009a062001986565b6020026020010151155b8062000a1f575080600081518110620009c757620009c762001986565b60200260200101518015620009f7575080600181518110620009ed57620009ed62001986565b6020026020010151155b801562000a1f57508060028151811062000a155762000a1562001986565b6020026020010151155b1562000acd5762000a597f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316620012da565b855160208701516040808901519051639065714760e01b81529396506001600160a01b0387169363906571479362000a98939092909160040162001eb9565b600060405180830381600087803b15801562000ab357600080fd5b505af115801562000ac8573d6000803e3d6000fd5b505050505b5062000b7b565b62000b087f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316620012da565b9150816001600160a01b031663dab27fa98c86602001518760400151876040518563ffffffff1660e01b815260040162000b46949392919062001efb565b600060405180830381600087803b15801562000b6157600080fd5b505af115801562000b76573d6000803e3d6000fd5b505050505b818160008151811062000b925762000b9262001986565b6001600160a01b039283166020918202929092010152821660c086015260405162000c1d907f00000000000000000000000000000000000000000000000000000000000000009062000bed908e908a908a9060240162001fa3565b60408051601f198184030181529190526020810180516001600160e01b031663a727afa360e01b1790526200137d565b84519098506000906001600160a01b031662000c3b57600562000c3e565b60045b60ff1667ffffffffffffffff81111562000c5c5762000c5c620019ba565b60405190808252806020026020018201604052801562000cb757816020015b6040805160a08101825260008082526020808301829052928201819052606082018190526080820152825260001990920191018162000c7b5790505b506040805160a0810190915290915080600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2c801b66040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000d5b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d819190620019d0565b8152508160008151811062000d9a5762000d9a62001986565b60209081029190910101526040805160a0810190915280600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e91ddf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000e45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e6b9190620019d0565b8152508160018151811062000e845762000e8462001986565b60209081029190910101526040805160a0810190915280600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c9c4bfca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000f2f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f559190620019d0565b8152508160028151811062000f6e5762000f6e62001986565b60209081029190910101526040805160a0810190915280600081526020018d6001600160a01b031681526020018a6001600160a01b0316815260200160006001600160a01b031681526020018d6001600160a01b0316630729d0546040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000ff9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200101f9190620019d0565b8152508160038151811062001038576200103862001986565b602090810291909101015284516001600160a01b031662001116576000836001600160a01b031663b2d2989c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001094573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010ba9190620019d0565b6040805160a0810190915290915080600081526001600160a01b0380871660208301528f1660408201526000606082015260800182905282518390600490811062001109576200110962001986565b6020026020010181905250505b90875260208701525094989397509295505050505050565b60408051600380825260808201909252606091600091906020820184803683370190505090506336372b0760e01b8160008151811062001172576200117262001986565b60200260200101906001600160e01b03191690816001600160e01b03191681525050637487d9fb60e11b81600181518110620011b257620011b262001986565b60200260200101906001600160e01b03191690816001600160e01b0319168152505063078984cd60e11b81600281518110620011f257620011f262001986565b6001600160e01b031990921660209283029190910190910152620012206001600160a01b038416826200138b565b9392505050565b604051306024820152600090819081906001600160a01b0385169060440160408051601f198184030181529181526020820180516001600160e01b03166370a0823160e01b179052516200127c9190620020a8565b600060405180830381855afa9150503d8060008114620012b9576040519150601f19603f3d011682016040523d82523d6000602084013e620012be565b606091505b5091509150818015620012d2575080516020145b949350505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b038116620013785760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c65640000000000000000000060448201526064016200022b565b919050565b600062001220838362001461565b60606000825167ffffffffffffffff811115620013ac57620013ac620019ba565b604051908082528060200260200182016040528015620013d6578160200160208202803683370190505b509050620013e4846200149d565b15620012205760005b835181101562001459576200141f8585838151811062001411576200141162001986565b6020026020010151620014d5565b82828151811062001434576200143462001986565b91151560209283029190910190910152806200145081620020c6565b915050620013ed565b509392505050565b60008282604051620014739062001560565b62001480929190620020ee565b604051809103906000f08015801562001459573d6000803e3d6000fd5b6000620014b2826301ffc9a760e01b620014d5565b8015620001ee5750620014ce826001600160e01b0319620014d5565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d9150600051905082801562001548575060208210155b8015620015555750600081115b979650505050505050565b6106fe806200211383390190565b6000602082840312156200158157600080fd5b81356001600160e01b0319811681146200122057600080fd5b80356001600160a01b03811681146200137857600080fd5b600060608284031215620015c557600080fd5b50919050565b60008060408385031215620015df57600080fd5b620015ea836200159a565b9150602083013567ffffffffffffffff8111156200160757600080fd5b6200161585828601620015b2565b9150509250929050565b60008151600381106200164257634e487b7160e01b600052602160045260246000fd5b8352506020818101516001600160a01b0390811691840191909152604080830151821690840152606080830151909116908301526080908101519082015260a00190565b6020808252825182820181905260009190848201906040850190845b81811015620016c757620016b88385516200161f565b938501939250600101620016a2565b50909695505050505050565b803561ffff811681146200137857600080fd5b600080600060608486031215620016fc57600080fd5b62001707846200159a565b92506200171760208501620016d3565b9150604084013567ffffffffffffffff8111156200173457600080fd5b6200174286828701620015b2565b9150509250925092565b60005b83811015620017695781810151838201526020016200174f565b50506000910152565b600081518084526200178c8160208601602086016200174c565b601f01601f19169290920160200192915050565b600081518084526020808501945080840160005b83811015620017db5781516001600160a01b031687529582019590820190600101620017b4565b509495945050505050565b6000815160408452620017fd6040850182620017a0565b60208481015186830387830152805180845290820193509091600091908301905b808310156200184757620018348286516200161f565b915083850194506001830192506200181e565b509695505050505050565b60408152600062001867604083018562001772565b82810360208401526200187b8185620017e6565b95945050505050565b6000806000604084860312156200189a57600080fd5b620018a5846200159a565b9250602084013567ffffffffffffffff80821115620018c357600080fd5b818601915086601f830112620018d857600080fd5b813581811115620018e857600080fd5b876020828501011115620018fb57600080fd5b6020830194508093505050509250925092565b6001600160a01b0383168152604060208201526000620012d26040830184620017e6565b6000808335601e198436030181126200194a57600080fd5b83018035915067ffffffffffffffff8211156200196657600080fd5b6020019150600581901b36038213156200197f57600080fd5b9250929050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620019af57600080fd5b62001220826200159a565b634e487b7160e01b600052604160045260246000fd5b600060208284031215620019e357600080fd5b5051919050565b6040805190810167ffffffffffffffff8111828210171562001a105762001a10620019ba565b60405290565b604051610120810167ffffffffffffffff8111828210171562001a105762001a10620019ba565b604051601f8201601f1916810167ffffffffffffffff8111828210171562001a695762001a69620019ba565b604052919050565b600067ffffffffffffffff82111562001a8e5762001a8e620019ba565b5060051b60200190565b600082601f83011262001aaa57600080fd5b8135602062001ac362001abd8362001a71565b62001a3d565b82815260059290921b8401810191818101908684111562001ae357600080fd5b8286015b84811015620018475762001afb816200159a565b835291830191830162001ae7565b803580151581146200137857600080fd5b803563ffffffff811681146200137857600080fd5b803567ffffffffffffffff811681146200137857600080fd5b600082601f83011262001b5a57600080fd5b813567ffffffffffffffff81111562001b775762001b77620019ba565b62001b8c601f8201601f191660200162001a3d565b81815284602083860101111562001ba257600080fd5b816020850160208301376000918101602001919091529392505050565b60006060828403121562001bd257600080fd5b6040516060810167ffffffffffffffff828210818311171562001bf95762001bf9620019ba565b8160405282935062001c0b856200159a565b8352602085013591508082111562001c2257600080fd5b62001c308683870162001b48565b6020840152604085013591508082111562001c4a57600080fd5b5062001c598582860162001b48565b6040830152505092915050565b60006040828403121562001c7957600080fd5b62001c83620019ea565b9050813567ffffffffffffffff8082111562001c9e57600080fd5b62001cac8583860162001a98565b835260209150818401358181111562001cc457600080fd5b84019050601f8101851362001cd857600080fd5b803562001ce962001abd8262001a71565b81815260059190911b8201830190838101908783111562001d0957600080fd5b928401925b8284101562001d295783358252928401929084019062001d0e565b8085870152505050505092915050565b6000806000806080858703121562001d5057600080fd5b843567ffffffffffffffff8082111562001d6957600080fd5b62001d778883890162001a98565b9550602087013591508082111562001d8e57600080fd5b90860190610120828903121562001da457600080fd5b62001dae62001a16565b62001db98362001b09565b815262001dc960208401620016d3565b602082015262001ddc6040840162001b1a565b604082015262001def6060840162001b1a565b606082015262001e026080840162001b2f565b608082015262001e1560a0840162001b2f565b60a082015262001e2860c084016200159a565b60c082015260e083013560e0820152610100808401358381111562001e4c57600080fd5b62001e5a8b82870162001b48565b82840152505080955050604087013591508082111562001e7957600080fd5b62001e878883890162001bbf565b9350606087013591508082111562001e9e57600080fd5b5062001ead8782880162001c66565b91505092959194509250565b6001600160a01b038416815260606020820152600062001edd606083018562001772565b828103604084015262001ef1818562001772565b9695505050505050565b6001600160a01b03851681526000602060808184015262001f20608084018762001772565b838103604085015262001f34818762001772565b9050838103606085015284516040825262001f536040830182620017a0565b8684015183820393850193909352825180825290840192840191506000905b8082101562001f94578251845292840192918401916001919091019062001f72565b50919998505050505050505050565b6001600160a01b038416815260606020820152600062001fc76060830185620017a0565b8281036040840152835115158152610120602085015162001fee602084018261ffff169052565b50604085015162002007604084018263ffffffff169052565b50606085015162002020606084018263ffffffff169052565b5060808501516200203d608084018267ffffffffffffffff169052565b5060a08501516200205a60a084018267ffffffffffffffff169052565b5060c08501516200207660c08401826001600160a01b03169052565b5060e085015160e08301526101008086015182828501526200209b8385018262001772565b9998505050505050505050565b60008251620020bc8184602087016200174c565b9190910192915050565b600060018201620020e757634e487b7160e01b600052601160045260246000fd5b5060010190565b6001600160a01b0383168152604060208201526000620012d260408301846200177256fe60806040526040516106fe3803806106fe83398101604081905261002291610319565b61002e82826000610035565b5050610436565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106d7602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103e7565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b81526004016101489190610403565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b50506000910152565b6000806040838503121561032c57600080fd5b82516001600160a01b038116811461034357600080fd5b60208401519092506001600160401b038082111561036057600080fd5b818501915085601f83011261037457600080fd5b815181811115610386576103866102df565b604051601f8201601f19908116603f011681019083821181831017156103ae576103ae6102df565b816040528281528860208487010111156103c757600080fd5b6103d88360208301602088016102f5565b80955050505050509250929050565b600082516103f98184602087016102f5565b9190910192915050565b60208152600082518060208401526104228160408501602087016102f5565b601f01601f19169190910160400192915050565b610292806104456000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025f602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061020f565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f919061022b565b60005b838110156102065781810151838201526020016101ee565b50506000910152565b600082516102218184602087016101eb565b9190910192915050565b602081526000825180602084015261024a8160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a", + "numDeployments": 6, + "solcInputHash": "b2279dada67c121f2d874fd99ecb76db", + "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract GovernanceERC20\",\"name\":\"_governanceERC20Base\",\"type\":\"address\"},{\"internalType\":\"contract GovernanceWrappedERC20\",\"name\":\"_governanceWrappedERC20Base\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenNotContract\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenNotERC20\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"WrongHelpersArrayLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"governanceERC20Base\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceWrappedERC20Base\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"prepareInstallation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"helpers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"struct IPluginSetup.PreparedSetupData\",\"name\":\"preparedSetupData\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"currentHelpers\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IPluginSetup.SetupPayload\",\"name\":\"_payload\",\"type\":\"tuple\"}],\"name\":\"prepareUninstallation\",\"outputs\":[{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_currentBuild\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"currentHelpers\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IPluginSetup.SetupPayload\",\"name\":\"_payload\",\"type\":\"tuple\"}],\"name\":\"prepareUpdate\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"initData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"helpers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"struct IPluginSetup.PreparedSetupData\",\"name\":\"preparedSetupData\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Vocdoni\",\"errors\":{\"TokenNotContract(address)\":[{\"params\":{\"token\":\"The token address\"}}],\"TokenNotERC20(address)\":[{\"params\":{\"token\":\"The token address\"}}],\"WrongHelpersArrayLength(uint256)\":[{\"params\":{\"length\":\"The array length of passed helpers.\"}}]},\"kind\":\"dev\",\"methods\":{\"implementation()\":{\"details\":\"The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\",\"returns\":{\"_0\":\"The address of the plugin implementation contract.\"}},\"prepareInstallation(address,bytes)\":{\"params\":{\"_dao\":\"The address of the installing DAO.\",\"_data\":\"The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\"},\"returns\":{\"plugin\":\"The address of the `Plugin` contract being prepared for installation.\",\"preparedSetupData\":\"The deployed plugin's relevant data which consists of helpers and permissions.\"}},\"prepareUninstallation(address,(address,address[],bytes))\":{\"params\":{\"_dao\":\"The address of the uninstalling DAO.\",\"_payload\":\"The relevant data necessary for the `prepareUninstallation`. See above.\"},\"returns\":{\"permissions\":\"The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\"}},\"prepareUpdate(address,uint16,(address,address[],bytes))\":{\"params\":{\"_currentBuild\":\"The build number of the plugin to update from.\",\"_dao\":\"The address of the updating DAO.\",\"_payload\":\"The relevant data necessary for the `prepareUpdate`. See above.\"},\"returns\":{\"initData\":\"The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\",\"preparedSetupData\":\"The deployed plugin's relevant data which consists of helpers and permissions.\"}},\"supportsInterface(bytes4)\":{\"params\":{\"_interfaceId\":\"The ID of the interface.\"},\"returns\":{\"_0\":\"Returns `true` if the interface is supported.\"}}},\"title\":\"VocdoniVotingSetup\",\"version\":1},\"userdoc\":{\"errors\":{\"TokenNotContract(address)\":[{\"notice\":\"Thrown if token address is passed which is not a token.\"}],\"TokenNotERC20(address)\":[{\"notice\":\"Thrown if token address is not ERC20.\"}],\"WrongHelpersArrayLength(uint256)\":[{\"notice\":\"Thrown if passed helpers array is of wrong length.\"}]},\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"The contract constructor, that deploys the `VocdoniVoting` plugin logic contract.\"},\"governanceERC20Base()\":{\"notice\":\"The address of the `GovernanceERC20` base contract.\"},\"governanceWrappedERC20Base()\":{\"notice\":\"The address of the `GovernanceWrappedERC20` base contract.\"},\"implementation()\":{\"notice\":\"Returns the plugin implementation address.\"},\"prepareInstallation(address,bytes)\":{\"notice\":\"Prepares the installation of a plugin.\"},\"prepareUninstallation(address,(address,address[],bytes))\":{\"notice\":\"Prepares the uninstallation of a plugin.\"},\"prepareUpdate(address,uint16,(address,address[],bytes))\":{\"notice\":\"Prepares the update of a plugin.\"},\"supportsInterface(bytes4)\":{\"notice\":\"Checks if this or the parent contract supports an interface by its ID.\"}},\"notice\":\"The setup contract of the `VocdoniVoting` plugin.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/VocdoniVotingSetup.sol\":\"VocdoniVotingSetup\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"@aragon/osx/core/dao/DAO.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/interfaces/IERC1271.sol\\\";\\n\\nimport {IProtocolVersion} from \\\"../../utils/protocol/IProtocolVersion.sol\\\";\\nimport {ProtocolVersion} from \\\"../../utils/protocol/ProtocolVersion.sol\\\";\\nimport {PermissionManager} from \\\"../permission/PermissionManager.sol\\\";\\nimport {CallbackHandler} from \\\"../utils/CallbackHandler.sol\\\";\\nimport {hasBit, flipBit} from \\\"../utils/BitMap.sol\\\";\\nimport {IEIP4824} from \\\"./IEIP4824.sol\\\";\\nimport {IDAO} from \\\"./IDAO.sol\\\";\\n\\n/// @title DAO\\n/// @author Aragon Association - 2021-2023\\n/// @notice This contract is the entry point to the Aragon DAO framework and provides our users a simple and easy to use public interface.\\n/// @dev Public API of the Aragon DAO framework.\\ncontract DAO is\\n IEIP4824,\\n Initializable,\\n IERC1271,\\n ERC165StorageUpgradeable,\\n IDAO,\\n UUPSUpgradeable,\\n ProtocolVersion,\\n PermissionManager,\\n CallbackHandler\\n{\\n using SafeERC20Upgradeable for IERC20Upgradeable;\\n using AddressUpgradeable for address;\\n\\n /// @notice The ID of the permission required to call the `execute` function.\\n bytes32 public constant EXECUTE_PERMISSION_ID = keccak256(\\\"EXECUTE_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\\n bytes32 public constant UPGRADE_DAO_PERMISSION_ID = keccak256(\\\"UPGRADE_DAO_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `setMetadata` function.\\n bytes32 public constant SET_METADATA_PERMISSION_ID = keccak256(\\\"SET_METADATA_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `setTrustedForwarder` function.\\n bytes32 public constant SET_TRUSTED_FORWARDER_PERMISSION_ID =\\n keccak256(\\\"SET_TRUSTED_FORWARDER_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `setSignatureValidator` function.\\n bytes32 public constant SET_SIGNATURE_VALIDATOR_PERMISSION_ID =\\n keccak256(\\\"SET_SIGNATURE_VALIDATOR_PERMISSION\\\");\\n\\n /// @notice The ID of the permission required to call the `registerStandardCallback` function.\\n bytes32 public constant REGISTER_STANDARD_CALLBACK_PERMISSION_ID =\\n keccak256(\\\"REGISTER_STANDARD_CALLBACK_PERMISSION\\\");\\n\\n /// @notice The internal constant storing the maximal action array length.\\n uint256 internal constant MAX_ACTIONS = 256;\\n\\n /// @notice The first out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set inidicating that a function was not entered.\\n uint256 private constant _NOT_ENTERED = 1;\\n\\n /// @notice The second out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set inidicating that a function was entered.\\n uint256 private constant _ENTERED = 2;\\n\\n /// @notice The [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @dev Added in v1.0.0.\\n IERC1271 public signatureValidator;\\n\\n /// @notice The address of the trusted forwarder verifying meta transactions.\\n /// @dev Added in v1.0.0.\\n address private trustedForwarder;\\n\\n /// @notice The [EIP-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI.\\n /// @dev Added in v1.0.0.\\n string private _daoURI;\\n\\n /// @notice The state variable for the reentrancy guard of the `execute` function.\\n /// @dev Added in v1.3.0. The variable can be of value `_NOT_ENTERED = 1` or `_ENTERED = 2` in usage and is initialized with `_NOT_ENTERED`.\\n uint256 private _reentrancyStatus;\\n\\n /// @notice Thrown if a call is reentrant.\\n error ReentrantCall();\\n\\n /// @notice Thrown if the action array length is larger than `MAX_ACTIONS`.\\n error TooManyActions();\\n\\n /// @notice Thrown if action execution has failed.\\n /// @param index The index of the action in the action array that failed.\\n error ActionFailed(uint256 index);\\n\\n /// @notice Thrown if an action has insufficent gas left.\\n error InsufficientGas();\\n\\n /// @notice Thrown if the deposit amount is zero.\\n error ZeroAmount();\\n\\n /// @notice Thrown if there is a mismatch between the expected and actually deposited amount of native tokens.\\n /// @param expected The expected native token amount.\\n /// @param actual The actual native token amount deposited.\\n error NativeTokenDepositAmountMismatch(uint256 expected, uint256 actual);\\n\\n /// @notice Thrown if an upgrade is not supported from a specific protocol version .\\n error ProtocolVersionUpgradeNotSupported(uint8[3] protocolVersion);\\n\\n /// @notice Emitted when a new DAO URI is set.\\n /// @param daoURI The new URI.\\n event NewURI(string daoURI);\\n\\n /// @notice A modifier to protect a function from calling itself, directly or indirectly (reentrancy).\\n /// @dev Currently, this modifier is only applied to the `execute()` function. If this is used multiple times, private `_beforeNonReentrant()` and `_afterNonReentrant()` functions should be created to prevent code duplication.\\n modifier nonReentrant() {\\n if (_reentrancyStatus == _ENTERED) {\\n revert ReentrantCall();\\n }\\n _reentrancyStatus = _ENTERED;\\n\\n _;\\n\\n _reentrancyStatus = _NOT_ENTERED;\\n }\\n\\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the DAO by\\n /// - setting the reentrancy status variable to `_NOT_ENTERED`\\n /// - registering the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID\\n /// - setting the trusted forwarder for meta transactions\\n /// - giving the `ROOT_PERMISSION_ID` permission to the initial owner (that should be revoked and transferred to the DAO after setup).\\n /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).\\n /// @param _metadata IPFS hash that points to all the metadata (logo, description, tags, etc.) of a DAO.\\n /// @param _initialOwner The initial owner of the DAO having the `ROOT_PERMISSION_ID` permission.\\n /// @param _trustedForwarder The trusted forwarder responsible for verifying meta transactions.\\n /// @param daoURI_ The DAO URI required to support [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824).\\n function initialize(\\n bytes calldata _metadata,\\n address _initialOwner,\\n address _trustedForwarder,\\n string calldata daoURI_\\n ) external reinitializer(2) {\\n _reentrancyStatus = _NOT_ENTERED; // added in v1.3.0\\n\\n _registerInterface(type(IDAO).interfaceId);\\n _registerInterface(type(IERC1271).interfaceId);\\n _registerInterface(type(IEIP4824).interfaceId);\\n _registerInterface(type(IProtocolVersion).interfaceId); // added in v1.3.0\\n _registerTokenInterfaces();\\n\\n _setMetadata(_metadata);\\n _setTrustedForwarder(_trustedForwarder);\\n _setDaoURI(daoURI_);\\n __PermissionManager_init(_initialOwner);\\n }\\n\\n /// @notice Initializes the DAO after an upgrade from a previous protocol version.\\n /// @param _previousProtocolVersion The semantic protocol version number of the previous DAO implementation contract this upgrade is transitioning from.\\n /// @param _initData The initialization data to be passed to via `upgradeToAndCall` (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)).\\n function initializeFrom(\\n uint8[3] calldata _previousProtocolVersion,\\n bytes calldata _initData\\n ) external reinitializer(2) {\\n _initData; // Silences the unused function parameter warning.\\n\\n // Check that the contract is not upgrading from a different major release.\\n if (_previousProtocolVersion[0] != 1) {\\n revert ProtocolVersionUpgradeNotSupported(_previousProtocolVersion);\\n }\\n\\n // Initialize `_reentrancyStatus` that was added in v1.3.0.\\n // Register Interface `ProtocolVersion` that was added in v1.3.0.\\n if (_previousProtocolVersion[1] <= 2) {\\n _reentrancyStatus = _NOT_ENTERED;\\n _registerInterface(type(IProtocolVersion).interfaceId);\\n }\\n }\\n\\n /// @inheritdoc PermissionManager\\n function isPermissionRestrictedForAnyAddr(\\n bytes32 _permissionId\\n ) internal pure override returns (bool) {\\n return\\n _permissionId == EXECUTE_PERMISSION_ID ||\\n _permissionId == UPGRADE_DAO_PERMISSION_ID ||\\n _permissionId == SET_METADATA_PERMISSION_ID ||\\n _permissionId == SET_TRUSTED_FORWARDER_PERMISSION_ID ||\\n _permissionId == SET_SIGNATURE_VALIDATOR_PERMISSION_ID ||\\n _permissionId == REGISTER_STANDARD_CALLBACK_PERMISSION_ID;\\n }\\n\\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n /// @dev The caller must have the `UPGRADE_DAO_PERMISSION_ID` permission.\\n function _authorizeUpgrade(address) internal virtual override auth(UPGRADE_DAO_PERMISSION_ID) {}\\n\\n /// @inheritdoc IDAO\\n function setTrustedForwarder(\\n address _newTrustedForwarder\\n ) external override auth(SET_TRUSTED_FORWARDER_PERMISSION_ID) {\\n _setTrustedForwarder(_newTrustedForwarder);\\n }\\n\\n /// @inheritdoc IDAO\\n function getTrustedForwarder() external view virtual override returns (address) {\\n return trustedForwarder;\\n }\\n\\n /// @inheritdoc IDAO\\n function hasPermission(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) external view override returns (bool) {\\n return isGranted(_where, _who, _permissionId, _data);\\n }\\n\\n /// @inheritdoc IDAO\\n function setMetadata(\\n bytes calldata _metadata\\n ) external override auth(SET_METADATA_PERMISSION_ID) {\\n _setMetadata(_metadata);\\n }\\n\\n /// @inheritdoc IDAO\\n function execute(\\n bytes32 _callId,\\n Action[] calldata _actions,\\n uint256 _allowFailureMap\\n )\\n external\\n override\\n nonReentrant\\n auth(EXECUTE_PERMISSION_ID)\\n returns (bytes[] memory execResults, uint256 failureMap)\\n {\\n // Check that the action array length is within bounds.\\n if (_actions.length > MAX_ACTIONS) {\\n revert TooManyActions();\\n }\\n\\n execResults = new bytes[](_actions.length);\\n\\n uint256 gasBefore;\\n uint256 gasAfter;\\n\\n for (uint256 i = 0; i < _actions.length; ) {\\n gasBefore = gasleft();\\n\\n (bool success, bytes memory result) = _actions[i].to.call{value: _actions[i].value}(\\n _actions[i].data\\n );\\n gasAfter = gasleft();\\n\\n // Check if failure is allowed\\n if (!hasBit(_allowFailureMap, uint8(i))) {\\n // Check if the call failed.\\n if (!success) {\\n revert ActionFailed(i);\\n }\\n } else {\\n // Check if the call failed.\\n if (!success) {\\n // Make sure that the action call did not fail because 63/64 of `gasleft()` was insufficient to execute the external call `.to.call` (see [ERC-150](https://eips.ethereum.org/EIPS/eip-150)).\\n // In specific scenarios, i.e. proposal execution where the last action in the action array is allowed to fail, the account calling `execute` could force-fail this action by setting a gas limit\\n // where 63/64 is insufficient causing the `.to.call` to fail, but where the remaining 1/64 gas are sufficient to successfully finish the `execute` call.\\n if (gasAfter < gasBefore / 64) {\\n revert InsufficientGas();\\n }\\n\\n // Store that this action failed.\\n failureMap = flipBit(failureMap, uint8(i));\\n }\\n }\\n\\n execResults[i] = result;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit Executed({\\n actor: msg.sender,\\n callId: _callId,\\n actions: _actions,\\n allowFailureMap: _allowFailureMap,\\n failureMap: failureMap,\\n execResults: execResults\\n });\\n }\\n\\n /// @inheritdoc IDAO\\n function deposit(\\n address _token,\\n uint256 _amount,\\n string calldata _reference\\n ) external payable override {\\n if (_amount == 0) revert ZeroAmount();\\n\\n if (_token == address(0)) {\\n if (msg.value != _amount)\\n revert NativeTokenDepositAmountMismatch({expected: _amount, actual: msg.value});\\n } else {\\n if (msg.value != 0)\\n revert NativeTokenDepositAmountMismatch({expected: 0, actual: msg.value});\\n\\n IERC20Upgradeable(_token).safeTransferFrom(msg.sender, address(this), _amount);\\n }\\n\\n emit Deposited(msg.sender, _token, _amount, _reference);\\n }\\n\\n /// @inheritdoc IDAO\\n function setSignatureValidator(\\n address _signatureValidator\\n ) external override auth(SET_SIGNATURE_VALIDATOR_PERMISSION_ID) {\\n signatureValidator = IERC1271(_signatureValidator);\\n\\n emit SignatureValidatorSet({signatureValidator: _signatureValidator});\\n }\\n\\n /// @inheritdoc IDAO\\n function isValidSignature(\\n bytes32 _hash,\\n bytes memory _signature\\n ) external view override(IDAO, IERC1271) returns (bytes4) {\\n if (address(signatureValidator) == address(0)) {\\n // Return the invalid magic number\\n return bytes4(0);\\n }\\n // Forward the call to the set signature validator contract\\n return signatureValidator.isValidSignature(_hash, _signature);\\n }\\n\\n /// @notice Emits the `NativeTokenDeposited` event to track native token deposits that weren't made via the deposit method.\\n /// @dev This call is bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\\n /// Gas cost increases in future hard forks might break this function. As an alternative, [ERC-2930](https://eips.ethereum.org/EIPS/eip-2930)-type transactions using access lists can be employed.\\n receive() external payable {\\n emit NativeTokenDeposited(msg.sender, msg.value);\\n }\\n\\n /// @notice Fallback to handle future versions of the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) standard.\\n /// @param _input An alias being equivalent to `msg.data`. This feature of the fallback function was introduced with the [solidity compiler version 0.7.6](https://github.com/ethereum/solidity/releases/tag/v0.7.6)\\n /// @return The magic number registered for the function selector triggering the fallback.\\n fallback(bytes calldata _input) external returns (bytes memory) {\\n bytes4 magicNumber = _handleCallback(msg.sig, _input);\\n return abi.encode(magicNumber);\\n }\\n\\n /// @notice Emits the MetadataSet event if new metadata is set.\\n /// @param _metadata Hash of the IPFS metadata object.\\n function _setMetadata(bytes calldata _metadata) internal {\\n emit MetadataSet(_metadata);\\n }\\n\\n /// @notice Sets the trusted forwarder on the DAO and emits the associated event.\\n /// @param _trustedForwarder The trusted forwarder address.\\n function _setTrustedForwarder(address _trustedForwarder) internal {\\n trustedForwarder = _trustedForwarder;\\n\\n emit TrustedForwarderSet(_trustedForwarder);\\n }\\n\\n /// @notice Registers the [ERC-721](https://eips.ethereum.org/EIPS/eip-721) and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) interfaces and callbacks.\\n function _registerTokenInterfaces() private {\\n _registerInterface(type(IERC721ReceiverUpgradeable).interfaceId);\\n _registerInterface(type(IERC1155ReceiverUpgradeable).interfaceId);\\n\\n _registerCallback(\\n IERC721ReceiverUpgradeable.onERC721Received.selector,\\n IERC721ReceiverUpgradeable.onERC721Received.selector\\n );\\n _registerCallback(\\n IERC1155ReceiverUpgradeable.onERC1155Received.selector,\\n IERC1155ReceiverUpgradeable.onERC1155Received.selector\\n );\\n _registerCallback(\\n IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector,\\n IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector\\n );\\n }\\n\\n /// @inheritdoc IDAO\\n function registerStandardCallback(\\n bytes4 _interfaceId,\\n bytes4 _callbackSelector,\\n bytes4 _magicNumber\\n ) external override auth(REGISTER_STANDARD_CALLBACK_PERMISSION_ID) {\\n _registerInterface(_interfaceId);\\n _registerCallback(_callbackSelector, _magicNumber);\\n emit StandardCallbackRegistered(_interfaceId, _callbackSelector, _magicNumber);\\n }\\n\\n /// @inheritdoc IEIP4824\\n function daoURI() external view returns (string memory) {\\n return _daoURI;\\n }\\n\\n /// @notice Updates the set DAO URI to a new value.\\n /// @param newDaoURI The new DAO URI to be set.\\n function setDaoURI(string calldata newDaoURI) external auth(SET_METADATA_PERMISSION_ID) {\\n _setDaoURI(newDaoURI);\\n }\\n\\n /// @notice Sets the new [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI and emits the associated event.\\n /// @param daoURI_ The new DAO URI.\\n function _setDaoURI(string calldata daoURI_) internal {\\n _daoURI = daoURI_;\\n\\n emit NewURI(daoURI_);\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0x86e1551c4c685e5bb38a6a68ffac0b390b3aa883f8dc9e1a45d321bceb1a7cc8\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/dao/IDAO.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IDAO\\n/// @author Aragon Association - 2022-2023\\n/// @notice The interface required for DAOs within the Aragon App DAO framework.\\ninterface IDAO {\\n /// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call.\\n /// @param to The address to call.\\n /// @param value The native token value to be sent with the call.\\n /// @param data The bytes-encoded function selector and calldata for the call.\\n struct Action {\\n address to;\\n uint256 value;\\n bytes data;\\n }\\n\\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\\n /// @param _where The address of the contract.\\n /// @param _who The address of a EOA or contract to give the permissions.\\n /// @param _permissionId The permission identifier.\\n /// @param _data The optional data passed to the `PermissionCondition` registered.\\n /// @return Returns true if the address has permission, false if not.\\n function hasPermission(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) external view returns (bool);\\n\\n /// @notice Updates the DAO metadata (e.g., an IPFS hash).\\n /// @param _metadata The IPFS hash of the new metadata object.\\n function setMetadata(bytes calldata _metadata) external;\\n\\n /// @notice Emitted when the DAO metadata is updated.\\n /// @param metadata The IPFS hash of the new metadata object.\\n event MetadataSet(bytes metadata);\\n\\n /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire execution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.\\n /// @param _callId The ID of the call. The definition of the value of `callId` is up to the calling contract and can be used, e.g., as a nonce.\\n /// @param _actions The array of actions.\\n /// @param _allowFailureMap A bitmap allowing execution to succeed, even if individual actions might revert. If the bit at index `i` is 1, the execution succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\\n /// @return The array of results obtained from the executed actions in `bytes`.\\n /// @return The resulting failure map containing the actions have actually failed.\\n function execute(\\n bytes32 _callId,\\n Action[] memory _actions,\\n uint256 _allowFailureMap\\n ) external returns (bytes[] memory, uint256);\\n\\n /// @notice Emitted when a proposal is executed.\\n /// @param actor The address of the caller.\\n /// @param callId The ID of the call.\\n /// @param actions The array of actions executed.\\n /// @param allowFailureMap The allow failure map encoding which actions are allowed to fail.\\n /// @param failureMap The failure map encoding which actions have failed.\\n /// @param execResults The array with the results of the executed actions.\\n /// @dev The value of `callId` is defined by the component/contract calling the execute function. A `Plugin` implementation can use it, for example, as a nonce.\\n event Executed(\\n address indexed actor,\\n bytes32 callId,\\n Action[] actions,\\n uint256 allowFailureMap,\\n uint256 failureMap,\\n bytes[] execResults\\n );\\n\\n /// @notice Emitted when a standard callback is registered.\\n /// @param interfaceId The ID of the interface.\\n /// @param callbackSelector The selector of the callback function.\\n /// @param magicNumber The magic number to be registered for the callback function selector.\\n event StandardCallbackRegistered(\\n bytes4 interfaceId,\\n bytes4 callbackSelector,\\n bytes4 magicNumber\\n );\\n\\n /// @notice Deposits (native) tokens to the DAO contract with a reference string.\\n /// @param _token The address of the token or address(0) in case of the native token.\\n /// @param _amount The amount of tokens to deposit.\\n /// @param _reference The reference describing the deposit reason.\\n function deposit(address _token, uint256 _amount, string calldata _reference) external payable;\\n\\n /// @notice Emitted when a token deposit has been made to the DAO.\\n /// @param sender The address of the sender.\\n /// @param token The address of the deposited token.\\n /// @param amount The amount of tokens deposited.\\n /// @param _reference The reference describing the deposit reason.\\n event Deposited(\\n address indexed sender,\\n address indexed token,\\n uint256 amount,\\n string _reference\\n );\\n\\n /// @notice Emitted when a native token deposit has been made to the DAO.\\n /// @dev This event is intended to be emitted in the `receive` function and is therefore bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\\n /// @param sender The address of the sender.\\n /// @param amount The amount of native tokens deposited.\\n event NativeTokenDeposited(address sender, uint256 amount);\\n\\n /// @notice Setter for the trusted forwarder verifying the meta transaction.\\n /// @param _trustedForwarder The trusted forwarder address.\\n function setTrustedForwarder(address _trustedForwarder) external;\\n\\n /// @notice Getter for the trusted forwarder verifying the meta transaction.\\n /// @return The trusted forwarder address.\\n function getTrustedForwarder() external view returns (address);\\n\\n /// @notice Emitted when a new TrustedForwarder is set on the DAO.\\n /// @param forwarder the new forwarder address.\\n event TrustedForwarderSet(address forwarder);\\n\\n /// @notice Setter for the [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @param _signatureValidator The address of the signature validator.\\n function setSignatureValidator(address _signatureValidator) external;\\n\\n /// @notice Emitted when the signature validator address is updated.\\n /// @param signatureValidator The address of the signature validator.\\n event SignatureValidatorSet(address signatureValidator);\\n\\n /// @notice Checks whether a signature is valid for the provided hash by forwarding the call to the set [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @param _hash The hash of the data to be signed.\\n /// @param _signature The signature byte array associated with `_hash`.\\n /// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid.\\n function isValidSignature(bytes32 _hash, bytes memory _signature) external returns (bytes4);\\n\\n /// @notice Registers an ERC standard having a callback by registering its [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID and callback function signature.\\n /// @param _interfaceId The ID of the interface.\\n /// @param _callbackSelector The selector of the callback function.\\n /// @param _magicNumber The magic number to be registered for the function signature.\\n function registerStandardCallback(\\n bytes4 _interfaceId,\\n bytes4 _callbackSelector,\\n bytes4 _magicNumber\\n ) external;\\n}\\n\",\"keccak256\":\"0x3876d62c73312234c1e2ab4e75cdac2783a6688c3445a67a15b767cd98e01f80\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/dao/IEIP4824.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\n/// @title EIP-4824 Common Interfaces for DAOs\\n/// @dev See https://eips.ethereum.org/EIPS/eip-4824\\n/// @author Aragon Association - 2021-2023\\ninterface IEIP4824 {\\n /// @notice A distinct Uniform Resource Identifier (URI) pointing to a JSON object following the \\\"EIP-4824 DAO JSON-LD Schema\\\". This JSON file splits into four URIs: membersURI, proposalsURI, activityLogURI, and governanceURI. The membersURI should point to a JSON file that conforms to the \\\"EIP-4824 Members JSON-LD Schema\\\". The proposalsURI should point to a JSON file that conforms to the \\\"EIP-4824 Proposals JSON-LD Schema\\\". The activityLogURI should point to a JSON file that conforms to the \\\"EIP-4824 Activity Log JSON-LD Schema\\\". The governanceURI should point to a flatfile, normatively a .md file. Each of the JSON files named above can be statically hosted or dynamically-generated.\\n /// @return _daoURI The DAO URI.\\n function daoURI() external view returns (string memory _daoURI);\\n}\\n\",\"keccak256\":\"0x8daa4bf72f8686ccea0441c3a0d8c10a5f4dc95e98351dc984346c099cc4db31\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/IPermissionCondition.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IPermissionCondition\\n/// @author Aragon Association - 2021-2023\\n/// @notice An interface to be implemented to support custom permission logic.\\n/// @dev To attach a condition to a permission, the `grantWithCondition` function must be used and refer to the implementing contract's address with the `condition` argument.\\ninterface IPermissionCondition {\\n /// @notice Checks if a call is permitted.\\n /// @param _where The address of the target contract.\\n /// @param _who The address (EOA or contract) for which the permissions are checked.\\n /// @param _permissionId The permission identifier.\\n /// @param _data Optional data passed to the `PermissionCondition` implementation.\\n /// @return isPermitted Returns true if the call is permitted.\\n function isGranted(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes calldata _data\\n ) external view returns (bool isPermitted);\\n}\\n\",\"keccak256\":\"0x942512b35407f9528ca209f8593fc179e36f93f689d507e04b27ad833ec5d141\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/PermissionCondition.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ERC165} from \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nimport {IPermissionCondition} from \\\"./IPermissionCondition.sol\\\";\\n\\n/// @title PermissionCondition\\n/// @author Aragon Association - 2023\\n/// @notice An abstract contract for non-upgradeable contracts instantiated via the `new` keyword to inherit from to support customary permissions depending on arbitrary on-chain state.\\nabstract contract PermissionCondition is ERC165, IPermissionCondition {\\n /// @notice Checks if an interface is supported by this or its parent contract.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPermissionCondition).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xd1a93aef06dce5ffcf566e5fc7e56991caa954f8bd477ae66f1ab5a7fd4c9527\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/PermissionLib.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title PermissionLib\\n/// @author Aragon Association - 2021-2023\\n/// @notice A library containing objects for permission processing.\\nlibrary PermissionLib {\\n /// @notice A constant expressing that no condition is applied to a permission.\\n address public constant NO_CONDITION = address(0);\\n\\n /// @notice The types of permission operations available in the `PermissionManager`.\\n /// @param Grant The grant operation setting a permission without a condition.\\n /// @param Revoke The revoke operation removing a permission (that was granted with or without a condition).\\n /// @param GrantWithCondition The grant operation setting a permission with a condition.\\n enum Operation {\\n Grant,\\n Revoke,\\n GrantWithCondition\\n }\\n\\n /// @notice A struct containing the information for a permission to be applied on a single target contract without a condition.\\n /// @param operation The permission operation type.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param permissionId The permission identifier.\\n struct SingleTargetPermission {\\n Operation operation;\\n address who;\\n bytes32 permissionId;\\n }\\n\\n /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a condition.\\n /// @param operation The permission operation type.\\n /// @param where The address of the target contract for which `who` receives permission.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\\n /// @param permissionId The permission identifier.\\n struct MultiTargetPermission {\\n Operation operation;\\n address where;\\n address who;\\n address condition;\\n bytes32 permissionId;\\n }\\n}\\n\",\"keccak256\":\"0x9b27fa8990e0f1623055187b8ade9363a6c8a1f15aab900e3a6e5cb312545c02\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/PermissionManager.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\n\\nimport {IPermissionCondition} from \\\"./IPermissionCondition.sol\\\";\\nimport {PermissionCondition} from \\\"./PermissionCondition.sol\\\";\\nimport \\\"./PermissionLib.sol\\\";\\n\\n/// @title PermissionManager\\n/// @author Aragon Association - 2021-2023\\n/// @notice The abstract permission manager used in a DAO, its associated plugins, and other framework-related components.\\nabstract contract PermissionManager is Initializable {\\n using AddressUpgradeable for address;\\n\\n /// @notice The ID of the permission required to call the `grant`, `grantWithCondition`, `revoke`, and `bulk` function.\\n bytes32 public constant ROOT_PERMISSION_ID = keccak256(\\\"ROOT_PERMISSION\\\");\\n\\n /// @notice A special address encoding permissions that are valid for any address `who` or `where`.\\n address internal constant ANY_ADDR = address(type(uint160).max);\\n\\n /// @notice A special address encoding if a permissions is not set and therefore not allowed.\\n address internal constant UNSET_FLAG = address(0);\\n\\n /// @notice A special address encoding if a permission is allowed.\\n address internal constant ALLOW_FLAG = address(2);\\n\\n /// @notice A mapping storing permissions as hashes (i.e., `permissionHash(where, who, permissionId)`) and their status encoded by an address (unset, allowed, or redirecting to a `PermissionCondition`).\\n mapping(bytes32 => address) internal permissionsHashed;\\n\\n /// @notice Thrown if a call is unauthorized.\\n /// @param where The context in which the authorization reverted.\\n /// @param who The address (EOA or contract) missing the permission.\\n /// @param permissionId The permission identifier.\\n error Unauthorized(address where, address who, bytes32 permissionId);\\n\\n /// @notice Thrown if a permission has been already granted with a different condition.\\n /// @dev This makes sure that condition on the same permission can not be overwriten by a different condition.\\n /// @param where The address of the target contract to grant `_who` permission to.\\n /// @param who The address (EOA or contract) to which the permission has already been granted.\\n /// @param permissionId The permission identifier.\\n /// @param currentCondition The current condition set for permissionId.\\n /// @param newCondition The new condition it tries to set for permissionId.\\n error PermissionAlreadyGrantedForDifferentCondition(\\n address where,\\n address who,\\n bytes32 permissionId,\\n address currentCondition,\\n address newCondition\\n );\\n\\n /// @notice Thrown if a condition address is not a contract.\\n /// @param condition The address that is not a contract.\\n error ConditionNotAContract(IPermissionCondition condition);\\n\\n /// @notice Thrown if a condition contract does not support the `IPermissionCondition` interface.\\n /// @param condition The address that is not a contract.\\n error ConditionInterfacNotSupported(IPermissionCondition condition);\\n\\n /// @notice Thrown for `ROOT_PERMISSION_ID` or `EXECUTE_PERMISSION_ID` permission grants where `who` or `where` is `ANY_ADDR`.\\n\\n error PermissionsForAnyAddressDisallowed();\\n\\n /// @notice Thrown for permission grants where `who` and `where` are both `ANY_ADDR`.\\n error AnyAddressDisallowedForWhoAndWhere();\\n\\n /// @notice Thrown if `Operation.GrantWithCondition` is requested as an operation but the method does not support it.\\n error GrantWithConditionNotSupported();\\n\\n /// @notice Emitted when a permission `permission` is granted in the context `here` to the address `_who` for the contract `_where`.\\n /// @param permissionId The permission identifier.\\n /// @param here The address of the context in which the permission is granted.\\n /// @param where The address of the target contract for which `_who` receives permission.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param condition The address `ALLOW_FLAG` for regular permissions or, alternatively, the `IPermissionCondition` contract implementation to be used.\\n event Granted(\\n bytes32 indexed permissionId,\\n address indexed here,\\n address where,\\n address indexed who,\\n address condition\\n );\\n\\n /// @notice Emitted when a permission `permission` is revoked in the context `here` from the address `_who` for the contract `_where`.\\n /// @param permissionId The permission identifier.\\n /// @param here The address of the context in which the permission is revoked.\\n /// @param where The address of the target contract for which `_who` loses permission.\\n /// @param who The address (EOA or contract) losing the permission.\\n event Revoked(\\n bytes32 indexed permissionId,\\n address indexed here,\\n address where,\\n address indexed who\\n );\\n\\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through this permission manager.\\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\\n modifier auth(bytes32 _permissionId) {\\n _auth(_permissionId);\\n _;\\n }\\n\\n /// @notice Initialization method to set the initial owner of the permission manager.\\n /// @dev The initial owner is granted the `ROOT_PERMISSION_ID` permission.\\n /// @param _initialOwner The initial owner of the permission manager.\\n function __PermissionManager_init(address _initialOwner) internal onlyInitializing {\\n _initializePermissionManager(_initialOwner);\\n }\\n\\n /// @notice Grants permission to an address to call methods in a contract guarded by an auth modifier with the specified permission identifier.\\n /// @dev Requires the `ROOT_PERMISSION_ID` permission.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) receiving the permission.\\n /// @param _permissionId The permission identifier.\\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function grant(\\n address _where,\\n address _who,\\n bytes32 _permissionId\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n _grant(_where, _who, _permissionId);\\n }\\n\\n /// @notice Grants permission to an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier if the referenced condition permits it.\\n /// @dev Requires the `ROOT_PERMISSION_ID` permission\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) receiving the permission.\\n /// @param _permissionId The permission identifier.\\n /// @param _condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function grantWithCondition(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n IPermissionCondition _condition\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n _grantWithCondition(_where, _who, _permissionId, _condition);\\n }\\n\\n /// @notice Revokes permission from an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier.\\n /// @dev Requires the `ROOT_PERMISSION_ID` permission.\\n /// @param _where The address of the target contract for which `_who` loses permission.\\n /// @param _who The address (EOA or contract) losing the permission.\\n /// @param _permissionId The permission identifier.\\n /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function revoke(\\n address _where,\\n address _who,\\n bytes32 _permissionId\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n _revoke(_where, _who, _permissionId);\\n }\\n\\n /// @notice Applies an array of permission operations on a single target contracts `_where`.\\n /// @param _where The address of the single target contract.\\n /// @param items The array of single-targeted permission operations to apply.\\n function applySingleTargetPermissions(\\n address _where,\\n PermissionLib.SingleTargetPermission[] calldata items\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n for (uint256 i; i < items.length; ) {\\n PermissionLib.SingleTargetPermission memory item = items[i];\\n\\n if (item.operation == PermissionLib.Operation.Grant) {\\n _grant(_where, item.who, item.permissionId);\\n } else if (item.operation == PermissionLib.Operation.Revoke) {\\n _revoke(_where, item.who, item.permissionId);\\n } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\\n revert GrantWithConditionNotSupported();\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Applies an array of permission operations on multiple target contracts `items[i].where`.\\n /// @param _items The array of multi-targeted permission operations to apply.\\n function applyMultiTargetPermissions(\\n PermissionLib.MultiTargetPermission[] calldata _items\\n ) external virtual auth(ROOT_PERMISSION_ID) {\\n for (uint256 i; i < _items.length; ) {\\n PermissionLib.MultiTargetPermission memory item = _items[i];\\n\\n if (item.operation == PermissionLib.Operation.Grant) {\\n _grant(item.where, item.who, item.permissionId);\\n } else if (item.operation == PermissionLib.Operation.Revoke) {\\n _revoke(item.where, item.who, item.permissionId);\\n } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\\n _grantWithCondition(\\n item.where,\\n item.who,\\n item.permissionId,\\n IPermissionCondition(item.condition)\\n );\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) for which the permission is checked.\\n /// @param _permissionId The permission identifier.\\n /// @param _data The optional data passed to the `PermissionCondition` registered.\\n /// @return Returns true if `_who` has the permissions on the target contract via the specified permission identifier.\\n function isGranted(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) public view virtual returns (bool) {\\n return\\n _isGranted(_where, _who, _permissionId, _data) || // check if `_who` has permission for `_permissionId` on `_where`\\n _isGranted(_where, ANY_ADDR, _permissionId, _data) || // check if anyone has permission for `_permissionId` on `_where`\\n _isGranted(ANY_ADDR, _who, _permissionId, _data); // check if `_who` has permission for `_permissionI` on any contract\\n }\\n\\n /// @notice Grants the `ROOT_PERMISSION_ID` permission to the initial owner during initialization of the permission manager.\\n /// @param _initialOwner The initial owner of the permission manager.\\n function _initializePermissionManager(address _initialOwner) internal {\\n _grant(address(this), _initialOwner, ROOT_PERMISSION_ID);\\n }\\n\\n /// @notice This method is used in the external `grant` method of the permission manager.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function _grant(address _where, address _who, bytes32 _permissionId) internal virtual {\\n if (_where == ANY_ADDR || _who == ANY_ADDR) {\\n revert PermissionsForAnyAddressDisallowed();\\n }\\n\\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\\n\\n address currentFlag = permissionsHashed[permHash];\\n\\n // Means permHash is not currently set.\\n if (currentFlag == UNSET_FLAG) {\\n permissionsHashed[permHash] = ALLOW_FLAG;\\n\\n emit Granted(_permissionId, msg.sender, _where, _who, ALLOW_FLAG);\\n }\\n }\\n\\n /// @notice This method is used in the external `grantWithCondition` method of the permission manager.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @param _condition An address either resolving to a `PermissionCondition` contract address or being the `ALLOW_FLAG` address (`address(2)`).\\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\\n function _grantWithCondition(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n IPermissionCondition _condition\\n ) internal virtual {\\n address conditionAddr = address(_condition);\\n\\n if (!conditionAddr.isContract()) {\\n revert ConditionNotAContract(_condition);\\n }\\n\\n if (\\n !PermissionCondition(conditionAddr).supportsInterface(\\n type(IPermissionCondition).interfaceId\\n )\\n ) {\\n revert ConditionInterfacNotSupported(_condition);\\n }\\n\\n if (_where == ANY_ADDR && _who == ANY_ADDR) {\\n revert AnyAddressDisallowedForWhoAndWhere();\\n }\\n\\n if (_where == ANY_ADDR || _who == ANY_ADDR) {\\n if (\\n _permissionId == ROOT_PERMISSION_ID ||\\n isPermissionRestrictedForAnyAddr(_permissionId)\\n ) {\\n revert PermissionsForAnyAddressDisallowed();\\n }\\n }\\n\\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\\n\\n address currentCondition = permissionsHashed[permHash];\\n\\n // Means permHash is not currently set.\\n if (currentCondition == UNSET_FLAG) {\\n permissionsHashed[permHash] = conditionAddr;\\n\\n emit Granted(_permissionId, msg.sender, _where, _who, conditionAddr);\\n } else if (currentCondition != conditionAddr) {\\n // Revert if `permHash` is already granted, but uses a different condition.\\n // If we don't revert, we either should:\\n // - allow overriding the condition on the same permission\\n // which could be confusing whoever granted the same permission first\\n // - or do nothing and succeed silently which could be confusing for the caller.\\n revert PermissionAlreadyGrantedForDifferentCondition({\\n where: _where,\\n who: _who,\\n permissionId: _permissionId,\\n currentCondition: currentCondition,\\n newCondition: conditionAddr\\n });\\n }\\n }\\n\\n /// @notice This method is used in the public `revoke` method of the permission manager.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that might have been granted in parallel.\\n function _revoke(address _where, address _who, bytes32 _permissionId) internal virtual {\\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\\n if (permissionsHashed[permHash] != UNSET_FLAG) {\\n permissionsHashed[permHash] = UNSET_FLAG;\\n\\n emit Revoked(_permissionId, msg.sender, _where, _who);\\n }\\n }\\n\\n /// @notice Checks if a caller is granted permissions on a target contract via a permission identifier and redirects the approval to a `PermissionCondition` if this was specified in the setup.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @param _data The optional data passed to the `PermissionCondition` registered.\\n /// @return Returns true if `_who` has the permissions on the contract via the specified permissionId identifier.\\n function _isGranted(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) internal view virtual returns (bool) {\\n address accessFlagOrCondition = permissionsHashed[\\n permissionHash(_where, _who, _permissionId)\\n ];\\n\\n if (accessFlagOrCondition == UNSET_FLAG) return false;\\n if (accessFlagOrCondition == ALLOW_FLAG) return true;\\n\\n // Since it's not a flag, assume it's a PermissionCondition and try-catch to skip failures\\n try\\n IPermissionCondition(accessFlagOrCondition).isGranted(\\n _where,\\n _who,\\n _permissionId,\\n _data\\n )\\n returns (bool allowed) {\\n if (allowed) return true;\\n } catch {}\\n\\n return false;\\n }\\n\\n /// @notice A private function to be used to check permissions on the permission manager contract (`address(this)`) itself.\\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\\n function _auth(bytes32 _permissionId) internal view virtual {\\n if (!isGranted(address(this), msg.sender, _permissionId, msg.data)) {\\n revert Unauthorized({\\n where: address(this),\\n who: msg.sender,\\n permissionId: _permissionId\\n });\\n }\\n }\\n\\n /// @notice Generates the hash for the `permissionsHashed` mapping obtained from the word \\\"PERMISSION\\\", the contract address, the address owning the permission, and the permission identifier.\\n /// @param _where The address of the target contract for which `_who` receives permission.\\n /// @param _who The address (EOA or contract) owning the permission.\\n /// @param _permissionId The permission identifier.\\n /// @return The permission hash.\\n function permissionHash(\\n address _where,\\n address _who,\\n bytes32 _permissionId\\n ) internal pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"PERMISSION\\\", _who, _where, _permissionId));\\n }\\n\\n /// @notice Decides if the granting permissionId is restricted when `_who == ANY_ADDR` or `_where == ANY_ADDR`.\\n /// @param _permissionId The permission identifier.\\n /// @return Whether or not the permission is restricted.\\n /// @dev By default, every permission is unrestricted and it is the derived contract's responsibility to override it. Note, that the `ROOT_PERMISSION_ID` is included and not required to be set it again.\\n function isPermissionRestrictedForAnyAddr(\\n bytes32 _permissionId\\n ) internal view virtual returns (bool) {\\n (_permissionId); // silence the warning.\\n return false;\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x7ca7d6598c32f07ab1ee5c7b03086d14871db06a1a3dff65bc574e43d65433db\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/IPlugin.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IPlugin\\n/// @author Aragon Association - 2022-2023\\n/// @notice An interface defining the traits of a plugin.\\ninterface IPlugin {\\n enum PluginType {\\n UUPS,\\n Cloneable,\\n Constructable\\n }\\n\\n /// @notice Returns the plugin's type\\n function pluginType() external view returns (PluginType);\\n}\\n\",\"keccak256\":\"0xcdb72c04ca35478e4d786fbbe12cf0e6de7d76aa0510028432312697f42c7355\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {UUPSUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport {IERC1822ProxiableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"../dao/IDAO.sol\\\";\\nimport {DaoAuthorizableUpgradeable} from \\\"./dao-authorizable/DaoAuthorizableUpgradeable.sol\\\";\\nimport {IPlugin} from \\\"./IPlugin.sol\\\";\\n\\n/// @title PluginUUPSUpgradeable\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract, upgradeable contract to inherit from when creating a plugin being deployed via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\nabstract contract PluginUUPSUpgradeable is\\n IPlugin,\\n ERC165Upgradeable,\\n UUPSUpgradeable,\\n DaoAuthorizableUpgradeable\\n{\\n // NOTE: When adding new state variables to the contract, the size of `_gap` has to be adapted below as well.\\n\\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @inheritdoc IPlugin\\n function pluginType() public pure override returns (PluginType) {\\n return PluginType.UUPS;\\n }\\n\\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\\n bytes32 public constant UPGRADE_PLUGIN_PERMISSION_ID = keccak256(\\\"UPGRADE_PLUGIN_PERMISSION\\\");\\n\\n /// @notice Initializes the plugin by storing the associated DAO.\\n /// @param _dao The DAO contract.\\n function __PluginUUPSUpgradeable_init(IDAO _dao) internal virtual onlyInitializing {\\n __DaoAuthorizableUpgradeable_init(_dao);\\n }\\n\\n /// @notice Checks if an interface is supported by this or its parent contract.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPlugin).interfaceId ||\\n _interfaceId == type(IERC1822ProxiableUpgradeable).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @notice Returns the address of the implementation contract in the [proxy storage slot](https://eips.ethereum.org/EIPS/eip-1967) slot the [UUPS proxy](https://eips.ethereum.org/EIPS/eip-1822) is pointing to.\\n /// @return The address of the implementation contract.\\n function implementation() public view returns (address) {\\n return _getImplementation();\\n }\\n\\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n /// @dev The caller must have the `UPGRADE_PLUGIN_PERMISSION_ID` permission.\\n function _authorizeUpgrade(\\n address\\n ) internal virtual override auth(UPGRADE_PLUGIN_PERMISSION_ID) {}\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5b12df9d646c59629dbaeb0a70df476a867a82887f5ef7d8b35697c01fcb45f3\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ContextUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"../../dao/IDAO.sol\\\";\\nimport {_auth} from \\\"../../utils/auth.sol\\\";\\n\\n/// @title DaoAuthorizableUpgradeable\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract contract providing a meta-transaction compatible modifier for upgradeable or cloneable contracts to authorize function calls through an associated DAO.\\n/// @dev Make sure to call `__DaoAuthorizableUpgradeable_init` during initialization of the inheriting contract.\\nabstract contract DaoAuthorizableUpgradeable is ContextUpgradeable {\\n /// @notice The associated DAO managing the permissions of inheriting contracts.\\n IDAO private dao_;\\n\\n /// @notice Initializes the contract by setting the associated DAO.\\n /// @param _dao The associated DAO address.\\n function __DaoAuthorizableUpgradeable_init(IDAO _dao) internal onlyInitializing {\\n dao_ = _dao;\\n }\\n\\n /// @notice Returns the DAO contract.\\n /// @return The DAO contract.\\n function dao() public view returns (IDAO) {\\n return dao_;\\n }\\n\\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through the associated DAO's permission manager.\\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\\n modifier auth(bytes32 _permissionId) {\\n _auth(dao_, address(this), _msgSender(), _permissionId, _msgData());\\n _;\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xd21dcde806070ad8f62acc81d986e517edb5a60ebdff8419660763018f7895e8\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/utils/BitMap.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\n/// @param bitmap The `uint256` representation of bits.\\n/// @param index The index number to check whether 1 or 0 is set.\\n/// @return Returns `true` if the bit is set at `index` on `bitmap`.\\nfunction hasBit(uint256 bitmap, uint8 index) pure returns (bool) {\\n uint256 bitValue = bitmap & (1 << index);\\n return bitValue > 0;\\n}\\n\\n/// @param bitmap The `uint256` representation of bits.\\n/// @param index The index number to set the bit.\\n/// @return Returns a new number in which the bit is set at `index`.\\nfunction flipBit(uint256 bitmap, uint8 index) pure returns (uint256) {\\n return bitmap ^ (1 << index);\\n}\\n\",\"keccak256\":\"0x6a2eb612d06f0db7ebe43691966f16556ad0ec0ae54831b75c2b64e308626e8e\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/utils/CallbackHandler.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\n/// @title CallbackHandler\\n/// @author Aragon Association - 2022-2023\\n/// @notice This contract handles callbacks by registering a magic number together with the callback function's selector. It provides the `_handleCallback` function that inheriting contracts have to call inside their `fallback()` function (`_handleCallback(msg.callbackSelector, msg.data)`). This allows to adaptively register ERC standards (e.g., [ERC-721](https://eips.ethereum.org/EIPS/eip-721), [ERC-1115](https://eips.ethereum.org/EIPS/eip-1155), or future versions of [ERC-165](https://eips.ethereum.org/EIPS/eip-165)) and returning the required magic numbers for the associated callback functions for the inheriting contract so that it doesn't need to be upgraded.\\n/// @dev This callback handling functionality is intented to be used by executor contracts (i.e., `DAO.sol`).\\nabstract contract CallbackHandler {\\n /// @notice A mapping between callback function selectors and magic return numbers.\\n mapping(bytes4 => bytes4) internal callbackMagicNumbers;\\n\\n /// @notice The magic number refering to unregistered callbacks.\\n bytes4 internal constant UNREGISTERED_CALLBACK = bytes4(0);\\n\\n /// @notice Thrown if the callback function is not registered.\\n /// @param callbackSelector The selector of the callback function.\\n /// @param magicNumber The magic number to be registered for the callback function selector.\\n error UnkownCallback(bytes4 callbackSelector, bytes4 magicNumber);\\n\\n /// @notice Emitted when `_handleCallback` is called.\\n /// @param sender Who called the callback.\\n /// @param sig The function signature.\\n /// @param data The calldata.\\n event CallbackReceived(address sender, bytes4 indexed sig, bytes data);\\n\\n /// @notice Handles callbacks to adaptively support ERC standards.\\n /// @dev This function is supposed to be called via `_handleCallback(msg.sig, msg.data)` in the `fallback()` function of the inheriting contract.\\n /// @param _callbackSelector The function selector of the callback function.\\n /// @param _data The calldata.\\n /// @return The magic number registered for the function selector triggering the fallback.\\n function _handleCallback(\\n bytes4 _callbackSelector,\\n bytes memory _data\\n ) internal virtual returns (bytes4) {\\n bytes4 magicNumber = callbackMagicNumbers[_callbackSelector];\\n if (magicNumber == UNREGISTERED_CALLBACK) {\\n revert UnkownCallback({callbackSelector: _callbackSelector, magicNumber: magicNumber});\\n }\\n\\n emit CallbackReceived({sender: msg.sender, sig: _callbackSelector, data: _data});\\n\\n return magicNumber;\\n }\\n\\n /// @notice Registers a magic number for a callback function selector.\\n /// @param _callbackSelector The selector of the callback function.\\n /// @param _magicNumber The magic number to be registered for the callback function selector.\\n function _registerCallback(bytes4 _callbackSelector, bytes4 _magicNumber) internal virtual {\\n callbackMagicNumbers[_callbackSelector] = _magicNumber;\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xeee37200b791d81fa46f614a49ad5b10acc9f9b4bef90e1984d0f374f70fa6ed\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/utils/auth.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {IDAO} from \\\"../dao/IDAO.sol\\\";\\n\\n/// @notice Thrown if a call is unauthorized in the associated DAO.\\n/// @param dao The associated DAO.\\n/// @param where The context in which the authorization reverted.\\n/// @param who The address (EOA or contract) missing the permission.\\n/// @param permissionId The permission identifier.\\nerror DaoUnauthorized(address dao, address where, address who, bytes32 permissionId);\\n\\n/// @notice A free function checking if a caller is granted permissions on a target contract via a permission identifier that redirects the approval to a `PermissionCondition` if this was specified in the setup.\\n/// @param _where The address of the target contract for which `who` receives permission.\\n/// @param _who The address (EOA or contract) owning the permission.\\n/// @param _permissionId The permission identifier.\\n/// @param _data The optional data passed to the `PermissionCondition` registered.\\nfunction _auth(\\n IDAO _dao,\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes calldata _data\\n) view {\\n if (!_dao.hasPermission(_where, _who, _permissionId, _data))\\n revert DaoUnauthorized({\\n dao: address(_dao),\\n where: _where,\\n who: _who,\\n permissionId: _permissionId\\n });\\n}\\n\",\"keccak256\":\"0x1c9cf22583c8b5a08c6d2c02a68d9f05e58900a9bb27efa3b30abca2ecfabfe4\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/framework/plugin/setup/IPluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {PermissionLib} from \\\"../../../core/permission/PermissionLib.sol\\\";\\nimport {IDAO} from \\\"../../../core/dao/IDAO.sol\\\";\\n\\n/// @title IPluginSetup\\n/// @author Aragon Association - 2022-2023\\n/// @notice The interface required for a plugin setup contract to be consumed by the `PluginSetupProcessor` for plugin installations, updates, and uninstallations.\\ninterface IPluginSetup {\\n /// @notice The data associated with a prepared setup.\\n /// @param helpers The address array of helpers (contracts or EOAs) associated with this plugin version after the installation or update.\\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the installing or updating DAO.\\n struct PreparedSetupData {\\n address[] helpers;\\n PermissionLib.MultiTargetPermission[] permissions;\\n }\\n\\n /// @notice The payload for plugin updates and uninstallations containing the existing contracts as well as optional data to be consumed by the plugin setup.\\n /// @param plugin The address of the `Plugin`.\\n /// @param currentHelpers The address array of all current helpers (contracts or EOAs) associated with the plugin to update from.\\n /// @param data The bytes-encoded data containing the input parameters for the preparation of update/uninstall as specified in the corresponding ABI on the version's metadata.\\n struct SetupPayload {\\n address plugin;\\n address[] currentHelpers;\\n bytes data;\\n }\\n\\n /// @notice Prepares the installation of a plugin.\\n /// @param _dao The address of the installing DAO.\\n /// @param _data The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\\n /// @return plugin The address of the `Plugin` contract being prepared for installation.\\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\\n function prepareInstallation(\\n address _dao,\\n bytes calldata _data\\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData);\\n\\n /// @notice Prepares the update of a plugin.\\n /// @param _dao The address of the updating DAO.\\n /// @param _currentBuild The build number of the plugin to update from.\\n /// @param _payload The relevant data necessary for the `prepareUpdate`. See above.\\n /// @return initData The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\\n function prepareUpdate(\\n address _dao,\\n uint16 _currentBuild,\\n SetupPayload calldata _payload\\n ) external returns (bytes memory initData, PreparedSetupData memory preparedSetupData);\\n\\n /// @notice Prepares the uninstallation of a plugin.\\n /// @param _dao The address of the uninstalling DAO.\\n /// @param _payload The relevant data necessary for the `prepareUninstallation`. See above.\\n /// @return permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\\n function prepareUninstallation(\\n address _dao,\\n SetupPayload calldata _payload\\n ) external returns (PermissionLib.MultiTargetPermission[] memory permissions);\\n\\n /// @notice Returns the plugin implementation address.\\n /// @return The address of the plugin implementation contract.\\n /// @dev The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x81d1e60154e672372318f6fccf337b6094bb8fe1192e2f755b8cc0d645ff5332\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/framework/plugin/setup/PluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ERC165} from \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {ERC165Checker} from \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\nimport {Clones} from \\\"@openzeppelin/contracts/proxy/Clones.sol\\\";\\n\\nimport {PermissionLib} from \\\"../../../core/permission/PermissionLib.sol\\\";\\nimport {createERC1967Proxy as createERC1967} from \\\"../../../utils/Proxy.sol\\\";\\nimport {IPluginSetup} from \\\"./IPluginSetup.sol\\\";\\n\\n/// @title PluginSetup\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract contract that developers have to inherit from to write the setup of a plugin.\\nabstract contract PluginSetup is ERC165, IPluginSetup {\\n /// @inheritdoc IPluginSetup\\n function prepareUpdate(\\n address _dao,\\n uint16 _currentBuild,\\n SetupPayload calldata _payload\\n )\\n external\\n virtual\\n override\\n returns (bytes memory initData, PreparedSetupData memory preparedSetupData)\\n {}\\n\\n /// @notice A convenience function to create an [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract pointing to an implementation and being associated to a DAO.\\n /// @param _implementation The address of the implementation contract to which the proxy is pointing to.\\n /// @param _data The data to initialize the storage of the proxy contract.\\n /// @return The address of the created proxy contract.\\n function createERC1967Proxy(\\n address _implementation,\\n bytes memory _data\\n ) internal returns (address) {\\n return createERC1967(_implementation, _data);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPluginSetup).interfaceId || super.supportsInterface(_interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x04ff3ec8a5b121ef3972dbb8140b7cf313f9ed514f8471841e3dcf5304ef6950\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/plugins/utils/Addresslist.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {CheckpointsUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/CheckpointsUpgradeable.sol\\\";\\n\\nimport {_uncheckedAdd, _uncheckedSub} from \\\"../../utils/UncheckedMath.sol\\\";\\n\\n/// @title Addresslist\\n/// @author Aragon Association - 2021-2023\\n/// @notice The majority voting implementation using a list of member addresses.\\n/// @dev This contract inherits from `MajorityVotingBase` and implements the `IMajorityVoting` interface.\\nabstract contract Addresslist {\\n using CheckpointsUpgradeable for CheckpointsUpgradeable.History;\\n\\n /// @notice The mapping containing the checkpointed history of the address list.\\n mapping(address => CheckpointsUpgradeable.History) private _addresslistCheckpoints;\\n\\n /// @notice The checkpointed history of the length of the address list.\\n CheckpointsUpgradeable.History private _addresslistLengthCheckpoints;\\n\\n /// @notice Thrown when the address list update is invalid, which can be caused by the addition of an existing member or removal of a non-existing member.\\n /// @param member The array of member addresses to be added or removed.\\n error InvalidAddresslistUpdate(address member);\\n\\n /// @notice Checks if an account is on the address list at a specific block number.\\n /// @param _account The account address being checked.\\n /// @param _blockNumber The block number.\\n /// @return Whether the account is listed at the specified block number.\\n function isListedAtBlock(\\n address _account,\\n uint256 _blockNumber\\n ) public view virtual returns (bool) {\\n return _addresslistCheckpoints[_account].getAtBlock(_blockNumber) == 1;\\n }\\n\\n /// @notice Checks if an account is currently on the address list.\\n /// @param _account The account address being checked.\\n /// @return Whether the account is currently listed.\\n function isListed(address _account) public view virtual returns (bool) {\\n return _addresslistCheckpoints[_account].latest() == 1;\\n }\\n\\n /// @notice Returns the length of the address list at a specific block number.\\n /// @param _blockNumber The specific block to get the count from. If `0`, then the latest checkpoint value is returned.\\n /// @return The address list length at the specified block number.\\n function addresslistLengthAtBlock(uint256 _blockNumber) public view virtual returns (uint256) {\\n return _addresslistLengthCheckpoints.getAtBlock(_blockNumber);\\n }\\n\\n /// @notice Returns the current length of the address list.\\n /// @return The current address list length.\\n function addresslistLength() public view virtual returns (uint256) {\\n return _addresslistLengthCheckpoints.latest();\\n }\\n\\n /// @notice Internal function to add new addresses to the address list.\\n /// @param _newAddresses The new addresses to be added.\\n function _addAddresses(address[] calldata _newAddresses) internal virtual {\\n for (uint256 i; i < _newAddresses.length; ) {\\n if (isListed(_newAddresses[i])) {\\n revert InvalidAddresslistUpdate(_newAddresses[i]);\\n }\\n\\n // Mark the address as listed\\n _addresslistCheckpoints[_newAddresses[i]].push(1);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n _addresslistLengthCheckpoints.push(_uncheckedAdd, _newAddresses.length);\\n }\\n\\n /// @notice Internal function to remove existing addresses from the address list.\\n /// @param _exitingAddresses The existing addresses to be removed.\\n function _removeAddresses(address[] calldata _exitingAddresses) internal virtual {\\n for (uint256 i; i < _exitingAddresses.length; ) {\\n if (!isListed(_exitingAddresses[i])) {\\n revert InvalidAddresslistUpdate(_exitingAddresses[i]);\\n }\\n\\n // Mark the address as not listed\\n _addresslistCheckpoints[_exitingAddresses[i]].push(0);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n _addresslistLengthCheckpoints.push(_uncheckedSub, _exitingAddresses.length);\\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 /// https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n uint256[48] private __gap;\\n}\\n\",\"keccak256\":\"0xd80d688df0b55e55406074a90c55be301edf73bcb68ad016db318d65bc05c868\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/plugins/utils/Ratio.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n// The base value to encode real-valued ratios on the interval `[0,1]` as integers on the interval `[0, 10**6]`.\\nuint256 constant RATIO_BASE = 10 ** 6;\\n\\n/// @notice Thrown if a ratio value exceeds the maximal value of `10**6`.\\n/// @param limit The maximal value.\\n/// @param actual The actual value.\\nerror RatioOutOfBounds(uint256 limit, uint256 actual);\\n\\n/// @notice Applies a ratio to a value and ceils the remainder.\\n/// @param _value The value to which the ratio is applied.\\n/// @param _ratio The ratio that must be in the interval `[0, 10**6]`.\\n/// @return result The resulting value.\\nfunction _applyRatioCeiled(uint256 _value, uint256 _ratio) pure returns (uint256 result) {\\n if (_ratio > RATIO_BASE) {\\n revert RatioOutOfBounds({limit: RATIO_BASE, actual: _ratio});\\n }\\n\\n _value = _value * _ratio;\\n uint256 remainder = _value % RATIO_BASE;\\n result = _value / RATIO_BASE;\\n\\n // Check if ceiling is needed\\n if (remainder != 0) {\\n ++result;\\n }\\n}\\n\",\"keccak256\":\"0x9f7090abe53c6a3a2972e596efc483df082df5ae219e3cb5f039f6294bffdd81\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/token/ERC20/IERC20MintableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\n/// @title IERC20MintableUpgradeable\\n/// @notice Interface to allow minting of [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens.\\ninterface IERC20MintableUpgradeable {\\n /// @notice Mints [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens for a receiving address.\\n /// @param _to The receiving address.\\n /// @param _amount The amount of tokens.\\n function mint(address _to, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0x67c5e5b94e83984da5427057e3945f1863c5d2a6f35fddd6abc1a11927167a46\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/token/ERC20/governance/GovernanceERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {IERC20PermitUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {IERC20MetadataUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport {ERC20VotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {IVotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\\\";\\n\\nimport {DaoAuthorizableUpgradeable} from \\\"../../../core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\\\";\\nimport {IDAO} from \\\"../../../core/dao/IDAO.sol\\\";\\nimport {IERC20MintableUpgradeable} from \\\"../IERC20MintableUpgradeable.sol\\\";\\n\\n/// @title GovernanceERC20\\n/// @author Aragon Association\\n/// @notice An [OpenZeppelin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) compatible [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token that can be used for voting and is managed by a DAO.\\ncontract GovernanceERC20 is\\n IERC20MintableUpgradeable,\\n Initializable,\\n ERC165Upgradeable,\\n ERC20VotesUpgradeable,\\n DaoAuthorizableUpgradeable\\n{\\n /// @notice The permission identifier to mint new tokens\\n bytes32 public constant MINT_PERMISSION_ID = keccak256(\\\"MINT_PERMISSION\\\");\\n\\n /// @notice The settings for the initial mint of the token.\\n /// @param receivers The receivers of the tokens.\\n /// @param amounts The amounts of tokens to be minted for each receiver.\\n /// @dev The lengths of `receivers` and `amounts` must match.\\n struct MintSettings {\\n address[] receivers;\\n uint256[] amounts;\\n }\\n\\n /// @notice Thrown if the number of receivers and amounts specified in the mint settings do not match.\\n /// @param receiversArrayLength The length of the `receivers` array.\\n /// @param amountsArrayLength The length of the `amounts` array.\\n error MintSettingsArrayLengthMismatch(uint256 receiversArrayLength, uint256 amountsArrayLength);\\n\\n /// @notice Calls the initialize function.\\n /// @param _dao The managing DAO.\\n /// @param _name The name of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.\\n /// @param _symbol The symbol of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.\\n /// @param _mintSettings The token mint settings struct containing the `receivers` and `amounts`.\\n constructor(\\n IDAO _dao,\\n string memory _name,\\n string memory _symbol,\\n MintSettings memory _mintSettings\\n ) {\\n initialize(_dao, _name, _symbol, _mintSettings);\\n }\\n\\n /// @notice Initializes the contract and mints tokens to a list of receivers.\\n /// @param _dao The managing DAO.\\n /// @param _name The name of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.\\n /// @param _symbol The symbol of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.\\n /// @param _mintSettings The token mint settings struct containing the `receivers` and `amounts`.\\n function initialize(\\n IDAO _dao,\\n string memory _name,\\n string memory _symbol,\\n MintSettings memory _mintSettings\\n ) public initializer {\\n // Check mint settings\\n if (_mintSettings.receivers.length != _mintSettings.amounts.length) {\\n revert MintSettingsArrayLengthMismatch({\\n receiversArrayLength: _mintSettings.receivers.length,\\n amountsArrayLength: _mintSettings.amounts.length\\n });\\n }\\n\\n __ERC20_init(_name, _symbol);\\n __ERC20Permit_init(_name);\\n __DaoAuthorizableUpgradeable_init(_dao);\\n\\n for (uint256 i; i < _mintSettings.receivers.length; ) {\\n _mint(_mintSettings.receivers[i], _mintSettings.amounts[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IERC20Upgradeable).interfaceId ||\\n _interfaceId == type(IERC20PermitUpgradeable).interfaceId ||\\n _interfaceId == type(IERC20MetadataUpgradeable).interfaceId ||\\n _interfaceId == type(IVotesUpgradeable).interfaceId ||\\n _interfaceId == type(IERC20MintableUpgradeable).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @notice Mints tokens to an address.\\n /// @param to The address receiving the tokens.\\n /// @param amount The amount of tokens to be minted.\\n function mint(address to, uint256 amount) external override auth(MINT_PERMISSION_ID) {\\n _mint(to, amount);\\n }\\n\\n // https://forum.openzeppelin.com/t/self-delegation-in-erc20votes/17501/12?u=novaknole\\n /// @inheritdoc ERC20VotesUpgradeable\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal override {\\n super._afterTokenTransfer(from, to, amount);\\n\\n // Automatically turn on delegation on mint/transfer but only for the first time.\\n if (to != address(0) && numCheckpoints(to) == 0 && delegates(to) == address(0)) {\\n _delegate(to, to);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf47bd02799c8ac3d021b348f857e6cc22c7782d3c99c88e59d3cb94921261134\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/token/ERC20/governance/GovernanceWrappedERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {ERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport {ERC20WrapperUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol\\\";\\nimport {IVotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\\\";\\nimport {IERC20PermitUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {IERC20MetadataUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport {ERC20VotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\n\\nimport {DaoAuthorizableUpgradeable} from \\\"../../../core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\\\";\\nimport {IDAO} from \\\"../../../core/dao/IDAO.sol\\\";\\nimport {IGovernanceWrappedERC20} from \\\"./IGovernanceWrappedERC20.sol\\\";\\n\\n/// @title GovernanceWrappedERC20\\n/// @author Aragon Association\\n/// @notice Wraps an existing [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token by inheriting from `ERC20WrapperUpgradeable` and allows to use it for voting by inheriting from `ERC20VotesUpgradeable`. The latter is compatible with [OpenZeppelin's `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) interface.\\n/// The contract also supports meta transactions. To use an `amount` of underlying tokens for voting, the token owner has to\\n/// 1. call `approve` for the tokens to be used by this contract\\n/// 2. call `depositFor` to wrap them, which safely transfers the underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens to the contract and mints wrapped [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens.\\n/// To get the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens back, the owner of the wrapped tokens can call `withdrawFor`, which burns the wrapped [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens and safely transfers the underlying tokens back to the owner.\\n/// @dev This contract intentionally has no public mint functionality because this is the responsibility of the underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token contract.\\ncontract GovernanceWrappedERC20 is\\n IGovernanceWrappedERC20,\\n Initializable,\\n ERC165Upgradeable,\\n ERC20VotesUpgradeable,\\n ERC20WrapperUpgradeable\\n{\\n /// @notice Calls the initialize function.\\n /// @param _token The underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.\\n /// @param _name The name of the wrapped token.\\n /// @param _symbol The symbol of the wrapped token.\\n constructor(IERC20Upgradeable _token, string memory _name, string memory _symbol) {\\n initialize(_token, _name, _symbol);\\n }\\n\\n /// @notice Initializes the contract.\\n /// @param _token The underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.\\n /// @param _name The name of the wrapped token.\\n /// @param _symbol The symbol of the wrapped token.\\n function initialize(\\n IERC20Upgradeable _token,\\n string memory _name,\\n string memory _symbol\\n ) public initializer {\\n __ERC20_init(_name, _symbol);\\n __ERC20Permit_init(_name);\\n __ERC20Wrapper_init(_token);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IGovernanceWrappedERC20).interfaceId ||\\n _interfaceId == type(IERC20Upgradeable).interfaceId ||\\n _interfaceId == type(IERC20PermitUpgradeable).interfaceId ||\\n _interfaceId == type(IERC20MetadataUpgradeable).interfaceId ||\\n _interfaceId == type(IVotesUpgradeable).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @inheritdoc ERC20WrapperUpgradeable\\n /// @dev Uses the `decimals` of the underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.\\n function decimals()\\n public\\n view\\n override(ERC20Upgradeable, ERC20WrapperUpgradeable)\\n returns (uint8)\\n {\\n return ERC20WrapperUpgradeable.decimals();\\n }\\n\\n /// @inheritdoc IGovernanceWrappedERC20\\n function depositFor(\\n address account,\\n uint256 amount\\n ) public override(IGovernanceWrappedERC20, ERC20WrapperUpgradeable) returns (bool) {\\n return ERC20WrapperUpgradeable.depositFor(account, amount);\\n }\\n\\n /// @inheritdoc IGovernanceWrappedERC20\\n function withdrawTo(\\n address account,\\n uint256 amount\\n ) public override(IGovernanceWrappedERC20, ERC20WrapperUpgradeable) returns (bool) {\\n return ERC20WrapperUpgradeable.withdrawTo(account, amount);\\n }\\n\\n // https://forum.openzeppelin.com/t/self-delegation-in-erc20votes/17501/12?u=novaknole\\n /// @inheritdoc ERC20VotesUpgradeable\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override(ERC20VotesUpgradeable, ERC20Upgradeable) {\\n super._afterTokenTransfer(from, to, amount);\\n\\n // Automatically turn on delegation on mint/transfer but only for the first time.\\n if (to != address(0) && numCheckpoints(to) == 0 && delegates(to) == address(0)) {\\n _delegate(to, to);\\n }\\n }\\n\\n /// @inheritdoc ERC20VotesUpgradeable\\n function _mint(\\n address to,\\n uint256 amount\\n ) internal override(ERC20VotesUpgradeable, ERC20Upgradeable) {\\n super._mint(to, amount);\\n }\\n\\n /// @inheritdoc ERC20VotesUpgradeable\\n function _burn(\\n address account,\\n uint256 amount\\n ) internal override(ERC20VotesUpgradeable, ERC20Upgradeable) {\\n super._burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0xcb29f2737339e31aa9991a98e108c590df5eba6ed4edb88b1578595525abaf9b\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/token/ERC20/governance/IGovernanceWrappedERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {ERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport {ERC20WrapperUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol\\\";\\n\\ninterface IGovernanceWrappedERC20 {\\n /// @notice Deposits an amount of underlying token and mints the corresponding number of wrapped tokens for a receiving address.\\n /// @param account The address receiving the minted, wrapped tokens.\\n /// @param amount The amount of tokens to deposit.\\n function depositFor(address account, uint256 amount) external returns (bool);\\n\\n /// @notice Withdraws an amount of underlying tokens to a receiving address and burns the corresponding number of wrapped tokens.\\n /// @param account The address receiving the withdrawn, underlying tokens.\\n /// @param amount The amount of underlying tokens to withdraw.\\n function withdrawTo(address account, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x379383d14bc3f74effb585110ad2f13570374d6bd4e4e298fb6bb5213f37bba7\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/// @notice Free function to create a [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract based on the passed base contract address.\\n/// @param _logic The base contract address.\\n/// @param _data The constructor arguments for this contract.\\n/// @return The address of the proxy contract created.\\n/// @dev Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, it\\u2019s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see [OpenZeppelin ERC1967Proxy-constructor](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy-constructor-address-bytes-)).\\nfunction createERC1967Proxy(address _logic, bytes memory _data) returns (address) {\\n return address(new ERC1967Proxy(_logic, _data));\\n}\\n\",\"keccak256\":\"0x9d871292dfac2f42957e4d10eec56fd74dda0bd7803c01e849d2e9f5e2799fff\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/UncheckedMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @notice Increments an unsigned integer by one without checking the result for overflow errors (using safe math).\\n/// @param i The number to be incremented.\\n/// @return The number incremented by one.\\nfunction _uncheckedIncrement(uint256 i) pure returns (uint256) {\\n unchecked {\\n ++i;\\n }\\n return i;\\n}\\n\\n/// @notice Adds two unsigned integers without checking the result for overflow errors (using safe math).\\n/// @param a The first summand.\\n/// @param b The second summand.\\n/// @return The sum.\\nfunction _uncheckedAdd(uint256 a, uint256 b) pure returns (uint256) {\\n unchecked {\\n return a + b;\\n }\\n}\\n\\n/// @notice Subtracts two unsigned integers without checking the result for overflow errors (using safe math).\\n/// @param a The minuend.\\n/// @param b The subtrahend.\\n/// @return The difference.\\nfunction _uncheckedSub(uint256 a, uint256 b) pure returns (uint256) {\\n unchecked {\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x69f00ee97ef1bd5ae895602a02650a56a97eddd716e63a729f446f9bffdebf85\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/protocol/IProtocolVersion.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IProtocolVersion\\n/// @author Aragon Association - 2022-2023\\n/// @notice An interface defining the semantic OSx protocol version.\\ninterface IProtocolVersion {\\n /// @notice Returns the protocol version at which the current contract was built. Use it to check for future upgrades that might be applicable.\\n /// @return _version Returns the semantic OSx protocol version.\\n function protocolVersion() external view returns (uint8[3] memory _version);\\n}\\n\",\"keccak256\":\"0xd356df9b42e6ed5be9cae21d31d0d3c62460831ed28d9c342d85f3c18eb0437d\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/protocol/ProtocolVersion.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {IProtocolVersion} from \\\"./IProtocolVersion.sol\\\";\\n\\n/// @title ProtocolVersion\\n/// @author Aragon Association - 2023\\n/// @notice An abstract, stateless, non-upgradeable contract serves as a base for other contracts requiring awareness of the OSx protocol version.\\n/// @dev Do not add any new variables to this contract that would shift down storage in the inheritance chain.\\nabstract contract ProtocolVersion is IProtocolVersion {\\n // IMPORTANT: Do not add any storage variable, see the above notice.\\n\\n /// @inheritdoc IProtocolVersion\\n function protocolVersion() public pure returns (uint8[3] memory) {\\n return [1, 3, 0];\\n }\\n}\\n\",\"keccak256\":\"0x08399a097c107c0ab6f8733e40af26318498117d3a20e815e973602842b36671\",\"license\":\"AGPL-3.0-or-later\"},\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol)\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.\\n *\\n * _Available since v4.5._\\n */\\ninterface IVotesUpgradeable {\\n /**\\n * @dev Emitted when an account changes their delegate.\\n */\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n\\n /**\\n * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.\\n */\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /**\\n * @dev Returns the current amount of votes that `account` has.\\n */\\n function getVotes(address account) external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is\\n * configured to use block numbers, this will return the value at the end of the corresponding block.\\n */\\n function getPastVotes(address account, uint256 timepoint) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is\\n * configured to use block numbers, this will return the value at the end of the corresponding block.\\n *\\n * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.\\n * Votes that have not been delegated are still part of total supply, even though they would not participate in a\\n * vote.\\n */\\n function getPastTotalSupply(uint256 timepoint) external view returns (uint256);\\n\\n /**\\n * @dev Returns the delegate that `account` has chosen.\\n */\\n function delegates(address account) external view returns (address);\\n\\n /**\\n * @dev Delegates votes from the sender to `delegatee`.\\n */\\n function delegate(address delegatee) external;\\n\\n /**\\n * @dev Delegates votes from signer to `delegatee`.\\n */\\n function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external;\\n}\\n\",\"keccak256\":\"0x2d600bbef9320309cd2a86c1d087eb9d6dbcc00430713ee54bbc5c5a2a11ba31\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967Upgradeable {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x47d6e06872b12e72c79d1b5eb55842f860b5fb1207b2317c2358d2766b950a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC5267Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)\\n\\npragma solidity ^0.8.0;\\n\\ninterface IERC5267Upgradeable {\\n /**\\n * @dev MAY be emitted to signal that the domain could have changed.\\n */\\n event EIP712DomainChanged();\\n\\n /**\\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\\n * signature.\\n */\\n function eip712Domain()\\n external\\n view\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n );\\n}\\n\",\"keccak256\":\"0xe562dab443278837fa50faddb76743399e942181881db8dccaea3bd1712994db\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC5805Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../governance/utils/IVotesUpgradeable.sol\\\";\\nimport \\\"./IERC6372Upgradeable.sol\\\";\\n\\ninterface IERC5805Upgradeable is IERC6372Upgradeable, IVotesUpgradeable {}\\n\",\"keccak256\":\"0x19848eec9045c8b91f1ab6b1853966443e3e36bcbc307593ed37a9f0df179d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC6372Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol)\\n\\npragma solidity ^0.8.0;\\n\\ninterface IERC6372Upgradeable {\\n /**\\n * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).\\n */\\n function clock() external view returns (uint48);\\n\\n /**\\n * @dev Description of the clock\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function CLOCK_MODE() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x3026befd6d69d1b46960bdc35a2ad37c0e1352f26983ee3728dd61fd32aa308a\",\"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.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC1967Upgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../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 */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {\\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 function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\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(address newImplementation, bytes memory data, bool forceCall) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n AddressUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) 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 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 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(address newBeacon, bytes memory data, bool forceCall) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\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[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7795808e3899c805254e3ae58074b20f799b466e3f43e057e47bedee5fb771f8\",\"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.9.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 * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\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 Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport {Initializable} from \\\"./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 /// @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 function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\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 * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\\n */\\n function upgradeTo(address newImplementation) public 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 * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public 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\":\"0xefb41f5c1a00249b7a99f0782f8c557865605426a3fb6e5fe9ae334293ae4f33\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\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)\\\"))` if transfer is allowed\\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 * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\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)\\\"))` if transfer is allowed\\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\",\"keccak256\":\"0xffcb29612efb57efc8f0d4897deb5abaeac830022c59a3aa17446d698dbc856b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xf51f292659a77777c0ed7375a39683d8bee53b86a6e7bd0c76f34ce7aa37a3a8\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../../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 * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\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 * 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 default value returned by this function, unless\\n * it's 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev 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(address owner, address spender, uint256 amount) 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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\":\"0xa9311aeb22f459e57d4dac77ee76cf43fb28ad3215278456211b5852b0e9e970\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x0e1f0f5f62f67a881cd1a9597acbc0a5e4071f3c2c10449a183b922ae7272e3f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../../../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 * @inheritdoc IERC20PermitUpgradeable\\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 * @inheritdoc IERC20PermitUpgradeable\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @inheritdoc IERC20PermitUpgradeable\\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\":\"0x3d159b9049d4ef465c1fb41f7ff7620f18f52bf6f8f3018bae4ed95c2df537d3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../interfaces/IERC5805Upgradeable.sol\\\";\\nimport \\\"../../../utils/math/MathUpgradeable.sol\\\";\\nimport \\\"../../../utils/math/SafeCastUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,\\n * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.\\n *\\n * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.\\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 {getVotes} and {getPastVotes}.\\n *\\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\\n *\\n * _Available since v4.2._\\n */\\nabstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable, IERC5805Upgradeable {\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint224 votes;\\n }\\n\\n bytes32 private constant _DELEGATION_TYPEHASH =\\n keccak256(\\\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\\\");\\n\\n mapping(address => address) private _delegates;\\n mapping(address => Checkpoint[]) private _checkpoints;\\n Checkpoint[] private _totalSupplyCheckpoints;\\n\\n function __ERC20Votes_init() internal onlyInitializing {\\n }\\n\\n function __ERC20Votes_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).\\n */\\n function clock() public view virtual override returns (uint48) {\\n return SafeCastUpgradeable.toUint48(block.number);\\n }\\n\\n /**\\n * @dev Description of the clock\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function CLOCK_MODE() public view virtual override returns (string memory) {\\n // Check that the clock was not modified\\n require(clock() == block.number, \\\"ERC20Votes: broken clock mode\\\");\\n return \\\"mode=blocknumber&from=default\\\";\\n }\\n\\n /**\\n * @dev Get the `pos`-th checkpoint for `account`.\\n */\\n function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {\\n return _checkpoints[account][pos];\\n }\\n\\n /**\\n * @dev Get number of checkpoints for `account`.\\n */\\n function numCheckpoints(address account) public view virtual returns (uint32) {\\n return SafeCastUpgradeable.toUint32(_checkpoints[account].length);\\n }\\n\\n /**\\n * @dev Get the address `account` is currently delegating to.\\n */\\n function delegates(address account) public view virtual override returns (address) {\\n return _delegates[account];\\n }\\n\\n /**\\n * @dev Gets the current votes balance for `account`\\n */\\n function getVotes(address account) public view virtual override returns (uint256) {\\n uint256 pos = _checkpoints[account].length;\\n unchecked {\\n return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\\n }\\n }\\n\\n /**\\n * @dev Retrieve the number of votes for `account` at the end of `timepoint`.\\n *\\n * Requirements:\\n *\\n * - `timepoint` must be in the past\\n */\\n function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) {\\n require(timepoint < clock(), \\\"ERC20Votes: future lookup\\\");\\n return _checkpointsLookup(_checkpoints[account], timepoint);\\n }\\n\\n /**\\n * @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances.\\n * It is NOT the sum of all the delegated votes!\\n *\\n * Requirements:\\n *\\n * - `timepoint` must be in the past\\n */\\n function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) {\\n require(timepoint < clock(), \\\"ERC20Votes: future lookup\\\");\\n return _checkpointsLookup(_totalSupplyCheckpoints, timepoint);\\n }\\n\\n /**\\n * @dev Lookup a value in a list of (sorted) checkpoints.\\n */\\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 timepoint) private view returns (uint256) {\\n // We run a binary search to look for the last (most recent) checkpoint taken before (or at) `timepoint`.\\n //\\n // Initially we check if the block is recent to narrow the search range.\\n // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).\\n // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.\\n // - If the middle checkpoint is after `timepoint`, we look in [low, mid)\\n // - If the middle checkpoint is before or equal to `timepoint`, we look in [mid+1, high)\\n // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not\\n // out of bounds (in which case we're looking too far in the past and the result is 0).\\n // Note that if the latest checkpoint available is exactly for `timepoint`, we end up with an index that is\\n // past the end of the array, so we technically don't find a checkpoint after `timepoint`, but it works out\\n // the same.\\n uint256 length = ckpts.length;\\n\\n uint256 low = 0;\\n uint256 high = length;\\n\\n if (length > 5) {\\n uint256 mid = length - MathUpgradeable.sqrt(length);\\n if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n unchecked {\\n return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes;\\n }\\n }\\n\\n /**\\n * @dev Delegate votes from the sender to `delegatee`.\\n */\\n function delegate(address delegatee) public virtual override {\\n _delegate(_msgSender(), delegatee);\\n }\\n\\n /**\\n * @dev Delegates votes from signer to `delegatee`\\n */\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n address signer = ECDSAUpgradeable.recover(\\n _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\\n v,\\n r,\\n s\\n );\\n require(nonce == _useNonce(signer), \\\"ERC20Votes: invalid nonce\\\");\\n _delegate(signer, delegatee);\\n }\\n\\n /**\\n * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).\\n */\\n function _maxSupply() internal view virtual returns (uint224) {\\n return type(uint224).max;\\n }\\n\\n /**\\n * @dev Snapshots the totalSupply after it has been increased.\\n */\\n function _mint(address account, uint256 amount) internal virtual override {\\n super._mint(account, amount);\\n require(totalSupply() <= _maxSupply(), \\\"ERC20Votes: total supply risks overflowing votes\\\");\\n\\n _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);\\n }\\n\\n /**\\n * @dev Snapshots the totalSupply after it has been decreased.\\n */\\n function _burn(address account, uint256 amount) internal virtual override {\\n super._burn(account, amount);\\n\\n _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);\\n }\\n\\n /**\\n * @dev Move voting power when tokens are transferred.\\n *\\n * Emits a {IVotes-DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual override {\\n super._afterTokenTransfer(from, to, amount);\\n\\n _moveVotingPower(delegates(from), delegates(to), amount);\\n }\\n\\n /**\\n * @dev Change delegation for `delegator` to `delegatee`.\\n *\\n * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}.\\n */\\n function _delegate(address delegator, address delegatee) internal virtual {\\n address currentDelegate = delegates(delegator);\\n uint256 delegatorBalance = balanceOf(delegator);\\n _delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveVotingPower(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _moveVotingPower(address src, address dst, uint256 amount) private {\\n if (src != dst && amount > 0) {\\n if (src != address(0)) {\\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);\\n emit DelegateVotesChanged(src, oldWeight, newWeight);\\n }\\n\\n if (dst != address(0)) {\\n (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);\\n emit DelegateVotesChanged(dst, oldWeight, newWeight);\\n }\\n }\\n }\\n\\n function _writeCheckpoint(\\n Checkpoint[] storage ckpts,\\n function(uint256, uint256) view returns (uint256) op,\\n uint256 delta\\n ) private returns (uint256 oldWeight, uint256 newWeight) {\\n uint256 pos = ckpts.length;\\n\\n unchecked {\\n Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1);\\n\\n oldWeight = oldCkpt.votes;\\n newWeight = op(oldWeight, delta);\\n\\n if (pos > 0 && oldCkpt.fromBlock == clock()) {\\n _unsafeAccess(ckpts, pos - 1).votes = SafeCastUpgradeable.toUint224(newWeight);\\n } else {\\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(clock()), votes: SafeCastUpgradeable.toUint224(newWeight)}));\\n }\\n }\\n }\\n\\n function _add(uint256 a, uint256 b) private pure returns (uint256) {\\n return a + b;\\n }\\n\\n function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.\\n */\\n function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) {\\n assembly {\\n mstore(0, ckpts.slot)\\n result.slot := add(keccak256(0, 0x20), pos)\\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[47] private __gap;\\n}\\n\",\"keccak256\":\"0x82d5c2e8d5c7209f5cd2e7a40807ba264cb8bc577db1b121eda5f14f62d609c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Wrapper.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../utils/SafeERC20Upgradeable.sol\\\";\\nimport {Initializable} from \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of the ERC20 token contract to support token wrapping.\\n *\\n * Users can deposit and withdraw \\\"underlying tokens\\\" and receive a matching number of \\\"wrapped tokens\\\". This is useful\\n * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the\\n * wrapping of an existing \\\"basic\\\" ERC20 into a governance token.\\n *\\n * _Available since v4.2._\\n *\\n * @custom:storage-size 51\\n */\\nabstract contract ERC20WrapperUpgradeable is Initializable, ERC20Upgradeable {\\n IERC20Upgradeable private _underlying;\\n\\n function __ERC20Wrapper_init(IERC20Upgradeable underlyingToken) internal onlyInitializing {\\n __ERC20Wrapper_init_unchained(underlyingToken);\\n }\\n\\n function __ERC20Wrapper_init_unchained(IERC20Upgradeable underlyingToken) internal onlyInitializing {\\n require(underlyingToken != this, \\\"ERC20Wrapper: cannot self wrap\\\");\\n _underlying = underlyingToken;\\n }\\n\\n /**\\n * @dev See {ERC20-decimals}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n try IERC20MetadataUpgradeable(address(_underlying)).decimals() returns (uint8 value) {\\n return value;\\n } catch {\\n return super.decimals();\\n }\\n }\\n\\n /**\\n * @dev Returns the address of the underlying ERC-20 token that is being wrapped.\\n */\\n function underlying() public view returns (IERC20Upgradeable) {\\n return _underlying;\\n }\\n\\n /**\\n * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens.\\n */\\n function depositFor(address account, uint256 amount) public virtual returns (bool) {\\n address sender = _msgSender();\\n require(sender != address(this), \\\"ERC20Wrapper: wrapper can't deposit\\\");\\n SafeERC20Upgradeable.safeTransferFrom(_underlying, sender, address(this), amount);\\n _mint(account, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens.\\n */\\n function withdrawTo(address account, uint256 amount) public virtual returns (bool) {\\n _burn(_msgSender(), amount);\\n SafeERC20Upgradeable.safeTransfer(_underlying, account, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake. Internal\\n * function that can be exposed with access control if desired.\\n */\\n function _recover(address account) internal virtual returns (uint256) {\\n uint256 value = _underlying.balanceOf(address(this)) - totalSupply();\\n _mint(account, value);\\n return value;\\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\":\"0x9a392cc2bd3a1582321389d5adc7f388df799547cde5f14de05f3b2f5fa31416\",\"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/IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/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 *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\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 * CAUTION: See Security Considerations above.\\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\":\"0x07e881de3b9f6d2c07909f193f24b96c7fe4ea60013260f3f25aecd8bab3c2f8\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-2612 is Final as of 2022-11-01. This file is deprecated.\\n\\nimport \\\"./IERC20PermitUpgradeable.sol\\\";\\n\",\"keccak256\":\"0x5225f0310a2992589600ebddffd0dd512a61836bda672b46744b416765d7ac31\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20Upgradeable {\\n using AddressUpgradeable for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20PermitUpgradeable token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x23b997be73d3dd46885262704f0f8cfc7273fdadfe303d37969a9561373972b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721ReceiverUpgradeable {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xbb2ed8106d94aeae6858e2551a1e7174df73994b77b13ebd120ccaaef80155f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\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\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CheckpointsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Checkpoints.sol)\\n// This file was procedurally generated from scripts/generate/templates/Checkpoints.js.\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SafeCastUpgradeable.sol\\\";\\n\\n/**\\n * @dev This library defines the `History` struct, for checkpointing values as they change at different points in\\n * time, and later looking up past values by block number. See {Votes} as an example.\\n *\\n * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new\\n * checkpoint for the current transaction block using the {push} function.\\n *\\n * _Available since v4.5._\\n */\\nlibrary CheckpointsUpgradeable {\\n struct History {\\n Checkpoint[] _checkpoints;\\n }\\n\\n struct Checkpoint {\\n uint32 _blockNumber;\\n uint224 _value;\\n }\\n\\n /**\\n * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one\\n * before it is returned, or zero otherwise. Because the number returned corresponds to that at the end of the\\n * block, the requested block number must be in the past, excluding the current block.\\n */\\n function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) {\\n require(blockNumber < block.number, \\\"Checkpoints: block not yet mined\\\");\\n uint32 key = SafeCastUpgradeable.toUint32(blockNumber);\\n\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one\\n * before it is returned, or zero otherwise. Similar to {upperLookup} but optimized for the case when the searched\\n * checkpoint is probably \\\"recent\\\", defined as being among the last sqrt(N) checkpoints where N is the number of\\n * checkpoints.\\n */\\n function getAtProbablyRecentBlock(History storage self, uint256 blockNumber) internal view returns (uint256) {\\n require(blockNumber < block.number, \\\"Checkpoints: block not yet mined\\\");\\n uint32 key = SafeCastUpgradeable.toUint32(blockNumber);\\n\\n uint256 len = self._checkpoints.length;\\n\\n uint256 low = 0;\\n uint256 high = len;\\n\\n if (len > 5) {\\n uint256 mid = len - MathUpgradeable.sqrt(len);\\n if (key < _unsafeAccess(self._checkpoints, mid)._blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);\\n\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block.\\n *\\n * Returns previous value and new value.\\n */\\n function push(History storage self, uint256 value) internal returns (uint256, uint256) {\\n return _insert(self._checkpoints, SafeCastUpgradeable.toUint32(block.number), SafeCastUpgradeable.toUint224(value));\\n }\\n\\n /**\\n * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will\\n * be set to `op(latest, delta)`.\\n *\\n * Returns previous value and new value.\\n */\\n function push(\\n History storage self,\\n function(uint256, uint256) view returns (uint256) op,\\n uint256 delta\\n ) internal returns (uint256, uint256) {\\n return push(self, op(latest(self), delta));\\n }\\n\\n /**\\n * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.\\n */\\n function latest(History storage self) internal view returns (uint224) {\\n uint256 pos = self._checkpoints.length;\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value\\n * in the most recent checkpoint.\\n */\\n function latestCheckpoint(\\n History storage self\\n ) internal view returns (bool exists, uint32 _blockNumber, uint224 _value) {\\n uint256 pos = self._checkpoints.length;\\n if (pos == 0) {\\n return (false, 0, 0);\\n } else {\\n Checkpoint memory ckpt = _unsafeAccess(self._checkpoints, pos - 1);\\n return (true, ckpt._blockNumber, ckpt._value);\\n }\\n }\\n\\n /**\\n * @dev Returns the number of checkpoint.\\n */\\n function length(History storage self) internal view returns (uint256) {\\n return self._checkpoints.length;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,\\n * or by updating the last one.\\n */\\n function _insert(Checkpoint[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) {\\n uint256 pos = self.length;\\n\\n if (pos > 0) {\\n // Copying to memory is important here.\\n Checkpoint memory last = _unsafeAccess(self, pos - 1);\\n\\n // Checkpoint keys must be non-decreasing.\\n require(last._blockNumber <= key, \\\"Checkpoint: decreasing keys\\\");\\n\\n // Update or push new checkpoint\\n if (last._blockNumber == key) {\\n _unsafeAccess(self, pos - 1)._value = value;\\n } else {\\n self.push(Checkpoint({_blockNumber: key, _value: value}));\\n }\\n return (last._value, value);\\n } else {\\n self.push(Checkpoint({_blockNumber: key, _value: value}));\\n return (0, value);\\n }\\n }\\n\\n /**\\n * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _upperBinaryLookup(\\n Checkpoint[] storage self,\\n uint32 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._blockNumber > key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _lowerBinaryLookup(\\n Checkpoint[] storage self,\\n uint32 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._blockNumber < key) {\\n low = mid + 1;\\n } else {\\n high = mid;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.\\n */\\n function _unsafeAccess(Checkpoint[] storage self, uint256 pos) private pure returns (Checkpoint storage result) {\\n assembly {\\n mstore(0, self.slot)\\n result.slot := add(keccak256(0, 0x20), pos)\\n }\\n }\\n\\n struct Trace224 {\\n Checkpoint224[] _checkpoints;\\n }\\n\\n struct Checkpoint224 {\\n uint32 _key;\\n uint224 _value;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint.\\n *\\n * Returns previous value and new value.\\n */\\n function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) {\\n return _insert(self._checkpoints, key, value);\\n }\\n\\n /**\\n * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none.\\n */\\n function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) {\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.\\n */\\n function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) {\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.\\n *\\n * NOTE: This is a variant of {upperLookup} that is optimised to find \\\"recent\\\" checkpoint (checkpoints with high keys).\\n */\\n function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) {\\n uint256 len = self._checkpoints.length;\\n\\n uint256 low = 0;\\n uint256 high = len;\\n\\n if (len > 5) {\\n uint256 mid = len - MathUpgradeable.sqrt(len);\\n if (key < _unsafeAccess(self._checkpoints, mid)._key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);\\n\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.\\n */\\n function latest(Trace224 storage self) internal view returns (uint224) {\\n uint256 pos = self._checkpoints.length;\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value\\n * in the most recent checkpoint.\\n */\\n function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) {\\n uint256 pos = self._checkpoints.length;\\n if (pos == 0) {\\n return (false, 0, 0);\\n } else {\\n Checkpoint224 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1);\\n return (true, ckpt._key, ckpt._value);\\n }\\n }\\n\\n /**\\n * @dev Returns the number of checkpoint.\\n */\\n function length(Trace224 storage self) internal view returns (uint256) {\\n return self._checkpoints.length;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,\\n * or by updating the last one.\\n */\\n function _insert(Checkpoint224[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) {\\n uint256 pos = self.length;\\n\\n if (pos > 0) {\\n // Copying to memory is important here.\\n Checkpoint224 memory last = _unsafeAccess(self, pos - 1);\\n\\n // Checkpoint keys must be non-decreasing.\\n require(last._key <= key, \\\"Checkpoint: decreasing keys\\\");\\n\\n // Update or push new checkpoint\\n if (last._key == key) {\\n _unsafeAccess(self, pos - 1)._value = value;\\n } else {\\n self.push(Checkpoint224({_key: key, _value: value}));\\n }\\n return (last._value, value);\\n } else {\\n self.push(Checkpoint224({_key: key, _value: value}));\\n return (0, value);\\n }\\n }\\n\\n /**\\n * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _upperBinaryLookup(\\n Checkpoint224[] storage self,\\n uint32 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._key > key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _lowerBinaryLookup(\\n Checkpoint224[] storage self,\\n uint32 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._key < key) {\\n low = mid + 1;\\n } else {\\n high = mid;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.\\n */\\n function _unsafeAccess(\\n Checkpoint224[] storage self,\\n uint256 pos\\n ) private pure returns (Checkpoint224 storage result) {\\n assembly {\\n mstore(0, self.slot)\\n result.slot := add(keccak256(0, 0x20), pos)\\n }\\n }\\n\\n struct Trace160 {\\n Checkpoint160[] _checkpoints;\\n }\\n\\n struct Checkpoint160 {\\n uint96 _key;\\n uint160 _value;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint.\\n *\\n * Returns previous value and new value.\\n */\\n function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) {\\n return _insert(self._checkpoints, key, value);\\n }\\n\\n /**\\n * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none.\\n */\\n function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) {\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.\\n */\\n function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) {\\n uint256 len = self._checkpoints.length;\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none.\\n *\\n * NOTE: This is a variant of {upperLookup} that is optimised to find \\\"recent\\\" checkpoint (checkpoints with high keys).\\n */\\n function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) {\\n uint256 len = self._checkpoints.length;\\n\\n uint256 low = 0;\\n uint256 high = len;\\n\\n if (len > 5) {\\n uint256 mid = len - MathUpgradeable.sqrt(len);\\n if (key < _unsafeAccess(self._checkpoints, mid)._key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);\\n\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.\\n */\\n function latest(Trace160 storage self) internal view returns (uint160) {\\n uint256 pos = self._checkpoints.length;\\n return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;\\n }\\n\\n /**\\n * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value\\n * in the most recent checkpoint.\\n */\\n function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) {\\n uint256 pos = self._checkpoints.length;\\n if (pos == 0) {\\n return (false, 0, 0);\\n } else {\\n Checkpoint160 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1);\\n return (true, ckpt._key, ckpt._value);\\n }\\n }\\n\\n /**\\n * @dev Returns the number of checkpoint.\\n */\\n function length(Trace160 storage self) internal view returns (uint256) {\\n return self._checkpoints.length;\\n }\\n\\n /**\\n * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,\\n * or by updating the last one.\\n */\\n function _insert(Checkpoint160[] storage self, uint96 key, uint160 value) private returns (uint160, uint160) {\\n uint256 pos = self.length;\\n\\n if (pos > 0) {\\n // Copying to memory is important here.\\n Checkpoint160 memory last = _unsafeAccess(self, pos - 1);\\n\\n // Checkpoint keys must be non-decreasing.\\n require(last._key <= key, \\\"Checkpoint: decreasing keys\\\");\\n\\n // Update or push new checkpoint\\n if (last._key == key) {\\n _unsafeAccess(self, pos - 1)._value = value;\\n } else {\\n self.push(Checkpoint160({_key: key, _value: value}));\\n }\\n return (last._value, value);\\n } else {\\n self.push(Checkpoint160({_key: key, _value: value}));\\n return (0, value);\\n }\\n }\\n\\n /**\\n * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _upperBinaryLookup(\\n Checkpoint160[] storage self,\\n uint96 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._key > key) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.\\n * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.\\n *\\n * WARNING: `high` should not be greater than the array's length.\\n */\\n function _lowerBinaryLookup(\\n Checkpoint160[] storage self,\\n uint96 key,\\n uint256 low,\\n uint256 high\\n ) private view returns (uint256) {\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (_unsafeAccess(self, mid)._key < key) {\\n low = mid + 1;\\n } else {\\n high = mid;\\n }\\n }\\n return high;\\n }\\n\\n /**\\n * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.\\n */\\n function _unsafeAccess(\\n Checkpoint160[] storage self,\\n uint256 pos\\n ) private pure returns (Checkpoint160 storage result) {\\n assembly {\\n mstore(0, self.slot)\\n result.slot := add(keccak256(0, 0x20), pos)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51ea916844ee2c53874c6895ce37acbca0250977b49b48909d75ad439f38f211\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"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.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x07ac95acad040f1fb1f6120dd0aa5f702db69446e95f82613721879d30de0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.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 `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\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 /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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(bytes32 hash, bytes32 r, bytes32 vs) 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(bytes32 hash, bytes32 r, bytes32 vs) 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(bytes32 hash, uint8 v, bytes32 r, bytes32 s) 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(bytes32 hash, uint8 v, bytes32 r, bytes32 s) 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 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\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 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0xa014f65d84b02827055d99993ccdbfb4b56b2c9e91eb278d82a93330659d06e4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC5267Upgradeable.sol\\\";\\nimport {Initializable} from \\\"../../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 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\\n * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the\\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable {\\n bytes32 private constant _TYPE_HASH =\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /// @custom:oz-renamed-from _HASHED_NAME\\n bytes32 private _hashedName;\\n /// @custom:oz-renamed-from _HASHED_VERSION\\n bytes32 private _hashedVersion;\\n\\n string private _name;\\n string private _version;\\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 _name = name;\\n _version = version;\\n\\n // Reset prior values in storage if upgrading\\n _hashedName = 0;\\n _hashedVersion = 0;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator();\\n }\\n\\n function _buildDomainSeparator() private view returns (bytes32) {\\n return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), 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 See {EIP-5267}.\\n *\\n * _Available since v4.9._\\n */\\n function eip712Domain()\\n public\\n view\\n virtual\\n override\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n )\\n {\\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\\n // and the EIP712 domain is not reliable, as it will be missing name and version.\\n require(_hashedName == 0 && _hashedVersion == 0, \\\"EIP712: Uninitialized\\\");\\n\\n return (\\n hex\\\"0f\\\", // 01111\\n _EIP712Name(),\\n _EIP712Version(),\\n block.chainid,\\n address(this),\\n bytes32(0),\\n new uint256[](0)\\n );\\n }\\n\\n /**\\n * @dev 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 _EIP712Name() internal virtual view returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev 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 _EIP712Version() internal virtual view returns (string memory) {\\n return _version;\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\\n */\\n function _EIP712NameHash() internal view returns (bytes32) {\\n string memory name = _EIP712Name();\\n if (bytes(name).length > 0) {\\n return keccak256(bytes(name));\\n } else {\\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\\n bytes32 hashedName = _hashedName;\\n if (hashedName != 0) {\\n return hashedName;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\n }\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\\n */\\n function _EIP712VersionHash() internal view returns (bytes32) {\\n string memory version = _EIP712Version();\\n if (bytes(version).length > 0) {\\n return keccak256(bytes(version));\\n } else {\\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\\n bytes32 hashedVersion = _hashedVersion;\\n if (hashedVersion != 0) {\\n return hashedVersion;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\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[48] private __gap;\\n}\\n\",\"keccak256\":\"0x7077d7f3369b21f286840c0d69b09a8a6d3d6e522fff67bfc240fd0a6cdf178c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC165Upgradeable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Storage based implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable {\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n function __ERC165Storage_init() internal onlyInitializing {\\n }\\n\\n function __ERC165Storage_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\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\":\"0x1d5cdcc5d72008be37606e2a27b3e7764b9e1bc24f3fc73fb6e9b2620b504d12\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\\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\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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(uint256 x, uint256 y, uint256 denominator) 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 // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\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(uint256 x, uint256 y, uint256 denominator, Rounding rounding) 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 256, 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 << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCastUpgradeable {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xcef50f95b43b038aa40aed25b62fc45906c681a5c1d504a4fdcf3bc6330a8d4b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC1271 standard signature validation method for\\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC1271 {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param hash Hash of the data to be signed\\n * @param signature Signature byte array associated with _data\\n */\\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0x0705a4b1b86d7b0bd8432118f226ba139c44b9dcaba0a6eafba2dd7d0639c544\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"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/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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(\\n address implementation,\\n bytes32 salt\\n ) internal view returns (address predicted) {\\n return predictDeterministicAddress(implementation, salt, address(this));\\n }\\n}\\n\",\"keccak256\":\"0x01f055f5c26ba25d7f83e9aa9ba877fbea4d0bf22227de046ea67494bc932999\",\"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.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 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 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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"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.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\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\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165Checker {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface.\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(\\n address account,\\n bytes4[] memory interfaceIds\\n ) internal view returns (bool[] memory) {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n *\\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\\n * should be exercised when using this function.\\n *\\n * Interface identification is specified in ERC-165.\\n */\\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\\n // prepare call\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\\n\\n // perform static call\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly {\\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0x00)\\n }\\n\\n return success && returnSize >= 0x20 && returnValue > 0;\\n }\\n}\\n\",\"keccak256\":\"0x5a08ad61f4e82b8a3323562661a86fb10b10190848073fdc13d4ac43710ffba5\",\"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\"},\"src/ExecutionMultisig.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity 0.8.17;\\n\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {SafeCastUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\nimport {PluginUUPSUpgradeable} from \\\"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\\\";\\nimport {Addresslist} from \\\"@aragon/osx/plugins/utils/Addresslist.sol\\\";\\n\\nimport {IExecutionMultisig} from \\\"./IExecutionMultisig.sol\\\";\\n\\nabstract contract ExecutionMultisig is\\n IExecutionMultisig,\\n Initializable,\\n ERC165Upgradeable,\\n PluginUUPSUpgradeable,\\n Addresslist\\n{\\n using SafeCastUpgradeable for uint256;\\n\\n /// @notice The ID of the permission required to add/remove executionMultisig members.\\n bytes32 public constant UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID =\\n keccak256(\\\"UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION\\\");\\n\\n /// @notice Keeps track at which block number the executionMultisig has been changed the last time.\\n uint64 internal lastExecutionMultisigChange;\\n\\n /// @notice Initializes the component to be used by inheriting contracts.\\n /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).\\n /// @param _dao The IDAO interface of the associated DAO.\\n function __ExecutionMultisig_init(IDAO _dao) internal onlyInitializing {\\n __PluginUUPSUpgradeable_init(_dao);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(\\n bytes4 _interfaceId\\n ) public view virtual override(ERC165Upgradeable, PluginUUPSUpgradeable) returns (bool) {\\n return\\n _interfaceId == type(IExecutionMultisig).interfaceId ||\\n _interfaceId == type(Addresslist).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @inheritdoc IExecutionMultisig\\n function addExecutionMultisigMembers(\\n address[] calldata _members\\n ) external override auth(UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID) {\\n _addExecutionMultisigMembers(_members);\\n }\\n\\n /// @notice Private function for adding execution multisig members.\\n /// @param _members The addresses to add.\\n function _addExecutionMultisigMembers(address[] calldata _members) internal {\\n _guardExecutionMultisig();\\n if (_members.length == 0) {\\n revert InvalidListLength({length: _members.length});\\n }\\n\\n uint256 newAddresslistLength = addresslistLength() + _members.length;\\n\\n // Check if the new address list length would be greater than `type(uint16).max`, the maximal number of approvals.\\n if (newAddresslistLength > type(uint16).max) {\\n revert AddresslistLengthOutOfBounds({\\n limit: type(uint16).max,\\n actual: newAddresslistLength\\n });\\n }\\n\\n _addAddresses(_members);\\n lastExecutionMultisigChange = uint64(block.number);\\n\\n emit ExecutionMultisigMembersAdded({newMembers: _members});\\n }\\n\\n /// @inheritdoc IExecutionMultisig\\n function removeExecutionMultisigMembers(address[] calldata _members) external virtual {}\\n\\n /// @inheritdoc IExecutionMultisig\\n function isExecutionMultisigMember(address _member) public view override returns (bool) {\\n return _isExecutionMultisigMember(_member);\\n }\\n\\n /// @notice Internal function for checking whether an address is a executionMultisig member.\\n /// @param _member The address to check.\\n /// @return Whether the address is a executionMultisig member.\\n function _isExecutionMultisigMember(address _member) internal view returns (bool) {\\n return isListed(_member);\\n }\\n\\n /// @notice Returns true if msg.sender has approved the given proposal tally\\n /// @param _proposalId The ID of the proposal.\\n /// @return Whether the msg.sender has approved the proposal tally.\\n function hasApprovedTally(\\n uint256 _proposalId,\\n address _member\\n ) external view virtual returns (bool);\\n\\n /// @notice Returns the block number of the last executionMultisig change.\\n /// @return The block number of the last executionMultisig change.\\n function getLastExecutionMultisigChange() external view returns (uint64) {\\n return lastExecutionMultisigChange;\\n }\\n\\n /// @notice Guard checks that processes key updates are not executed in the same block\\n /// where the executionMultisig changed.\\n function _guardExecutionMultisig() internal view {\\n if (lastExecutionMultisigChange == uint64(block.number)) {\\n revert ExecutionMultisigUpdatedTooRecently({lastUpdate: lastExecutionMultisigChange});\\n }\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xdf674b6958c4ef4ae0c5651b611316cd5fae9b1aad0687ad873a7095856b467e\",\"license\":\"AGPL-3.0-or-later\"},\"src/IExecutionMultisig.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity 0.8.17;\\n\\ninterface IExecutionMultisig {\\n /// @notice Emitted when one or more execution multisig members are added.\\n /// @param newMembers The addresses of the new execution multisig members.\\n event ExecutionMultisigMembersAdded(address[] newMembers);\\n\\n /// @notice Emitted when one or more execution multisig member are removed.\\n /// @param removedMembers The addresses of the removed execution multisig members.\\n event ExecutionMultisigMembersRemoved(address[] removedMembers);\\n\\n /// @notice Thrown if the address list length is out of bounds.\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error AddresslistLengthOutOfBounds(uint16 limit, uint256 actual);\\n\\n /// @notice Thrown if invalid list length\\n /// @param length The actual length\\n error InvalidListLength(uint256 length);\\n\\n /// @notice Thrown if the minimal approvals value is out of bounds (less than 1 or greater than the number of members in the address list).\\n /// @param limit The maximal value.\\n /// @param actual The actual value.\\n error MinApprovalsOutOfBounds(uint16 limit, uint16 actual);\\n\\n /// @notice Thrown if the execution multisig is updated too recently.\\n /// @param lastUpdate The block number of the last update.\\n error ExecutionMultisigUpdatedTooRecently(uint64 lastUpdate);\\n\\n /// @notice Adds members to the execution multisig.\\n /// @param _members The addresses to add.\\n function addExecutionMultisigMembers(address[] calldata _members) external;\\n\\n /// @notice Removes members from the execution multisig.\\n /// @param _members The addresses to remove.\\n function removeExecutionMultisigMembers(address[] calldata _members) external;\\n\\n /// @notice Checks if an address is a member of the execution multisig.\\n /// @param _member The address to check.\\n /// @return Whether the address is a member of the execution multisig.\\n function isExecutionMultisigMember(address _member) external view returns (bool);\\n\\n /// @notice Returns true if msg.sender has approved the given proposal tally\\n /// @param _proposalId The ID of the proposal.\\n /// @return Whether the msg.sender has approved the proposal tally.\\n function hasApprovedTally(uint256 _proposalId, address _member) external view returns (bool);\\n\\n /// @notice Returns the block number of the last executionMultisig change.\\n /// @return The block number of the last executionMultisig change.\\n function getLastExecutionMultisigChange() external view returns (uint64);\\n}\\n\",\"keccak256\":\"0x2cf5f12c84bb95af82a1407d0e000663d611db68ea257ad58949885e7ded5d4d\",\"license\":\"AGPL-3.0-or-later\"},\"src/IVocdoniProposal.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\n\\n/// @title IVocdoniProposal\\n/// @notice An interface to be implemented by DAO plugins that create and execute gasless proposals.\\n/// @dev Slightly modified from the original Aragon OSx IProposal interface.\\ninterface IVocdoniProposal {\\n /// @notice Emitted when a proposal is created.\\n /// @param proposalId The ID of the proposal.\\n /// @param vochainProposalId The ID of the proposal in the Vochain.\\n /// @param creator The creator of the proposal.\\n /// @param startDate The start date of the proposal in seconds.\\n /// @param voteEndDate The vote end date of the proposal in seconds.\\n /// @param tallyEndDate The tally end date of the proposal in seconds.\\n /// @param actions The actions that will be executed if the proposal passes.\\n /// @param allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1, the proposal succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\\n event ProposalCreated(\\n uint256 indexed proposalId,\\n bytes32 indexed vochainProposalId,\\n address indexed creator,\\n uint64 startDate,\\n uint64 voteEndDate,\\n uint64 tallyEndDate,\\n IDAO.Action[] actions,\\n uint256 allowFailureMap\\n );\\n\\n /// @notice Emitted when a proposal is executed.\\n /// @param proposalId The ID of the proposal.\\n event ProposalExecuted(uint256 indexed proposalId);\\n\\n /// @notice Returns the proposal count determining the next proposal ID.\\n /// @return The proposal count.\\n function proposalCount() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xdf3e21c77d9bb24c90b0380792386b94b7a9e61a6227dc0b1fef848ff438faf1\",\"license\":\"AGPL-3.0-or-later\"},\"src/IVocdoniVoting.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity 0.8.17;\\n\\n/// @title IVocdoniVoting\\n/// @author Vocdoni\\n/// @notice The Vocdoni gasless voting contract interface for the OSX plugin.\\n/// @notice The voting Proposal is managed gasless on the Vocdoni blockchain.\\ninterface IVocdoniVoting {\\n /// @notice Emitted when the tally of a proposal is set.\\n /// @param proposalId The ID of the proposal.\\n /// @param tally The tally.\\n event TallySet(uint256 indexed proposalId, uint256[][] tally);\\n\\n /// @notice Emitted when the tally of a proposal is approved by a member.\\n /// @param proposalId The ID of the proposal.\\n event TallyApproval(uint256 indexed proposalId, address indexed approver);\\n\\n /// @notice Thrown if the vote phase duration is out of bounds (more than 1 year or less than 1 hour).\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error VoteDurationOutOfBounds(uint64 limit, uint64 actual);\\n\\n /// @notice Trown if the tally phase duration is out of bounds (more than 1 year or less than 1 hour).\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error TallyDurationOutOfBounds(uint64 limit, uint64 actual);\\n\\n /// @notice Thrown if the start date is invalid.\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error InvalidStartDate(uint64 limit, uint64 actual);\\n\\n /// @notice Thrown if the end date is invalid.\\n /// @param limit The limit value.\\n /// @param actual The actual value.\\n error InvalidVoteEndDate(uint64 limit, uint64 actual);\\n\\n /// @notice Thrown if the tally end date is invalid.\\n /// @param limit The tally end date.\\n /// @param actual The actual value.\\n error InvalidTallyEndDate(uint64 limit, uint64 actual);\\n\\n /// @notice Thrown if the plugin settings are updated too recently.\\n /// @param lastUpdate The block number of the last update.\\n error PluginSettingsUpdatedTooRecently(uint64 lastUpdate);\\n\\n /// @notice Thrown if the proposal is already executed.\\n /// @param proposalId The ID of the proposal.\\n error ProposalAlreadyExecuted(uint256 proposalId);\\n\\n /// @notice Thrown if the proposal tally is invalid.\\n /// @param tally The tally of the proposal.\\n error InvalidTally(uint256[][] tally);\\n\\n /// @notice Thrown if the proposal tally is already set and approved.\\n /// @param approvals The number of approvals.\\n /// @param minApprovals The minimum number of approvals required.\\n error TallyAlreadyApproved(uint256 approvals, uint16 minApprovals);\\n\\n /// @notice Thrown is the tally is already approved by the sender.\\n /// @param sender The sender.\\n error TallyAlreadyApprovedBySender(address sender);\\n\\n /// @notice Thrown if the proposal tally is not approved by enough execution multisig members.\\n /// @param minApprovals The minimum number of approvals required.\\n /// @param actualApprovals The actual number of approvals.\\n error NotEnoughApprovals(uint16 minApprovals, uint16 actualApprovals);\\n\\n /// @notice Thrown if an address is not valid or not supported\\n /// @param addr The address\\n error InvalidAddress(address addr);\\n\\n /// @notice Thrown if the proposal is not in the tally phase\\n /// @param voteEndDate The end date of the proposal\\n /// @param tallyEndDate The tally end date of the proposal\\n /// @param currentTimestamp The current timestamp\\n error ProposalNotInTallyPhase(\\n uint64 voteEndDate,\\n uint64 tallyEndDate,\\n uint256 currentTimestamp\\n );\\n\\n /// @notice Thrown if the msg.sender does not have enough voting power\\n /// @param required The required voting power\\n error NotEnoughVotingPower(uint256 required);\\n\\n /// @notice Thrown if the msg.sender is not a execution multisig member\\n /// @param sender The sender\\n error OnlyExecutionMultisig(address sender);\\n\\n /// @notice Thrown if the support threshold is not reached\\n /// @param currentSupport The current support\\n /// @param supportThreshold The support threshold\\n error SupportThresholdNotReached(uint256 currentSupport, uint32 supportThreshold);\\n\\n /// @notice Thrown if the minimum participation is not reached\\n /// @param currentVotingPower The current voting power\\n /// @param minVotingPower The minimum voting power to reach\\n error MinParticipationNotReached(uint256 currentVotingPower, uint256 minVotingPower);\\n\\n /// @notice Thrown if the total voting power is invalid\\n /// @param totalVotingPower The total voting power\\n error InvalidTotalVotingPower(uint256 totalVotingPower);\\n\\n /// @notice Sets the tally of a given proposal.\\n /// @param _proposalId The ID of the proposal to set the tally of.\\n /// @param _tally The tally to set.\\n function setTally(uint256 _proposalId, uint256[][] memory _tally) external;\\n\\n /// @notice Approves a proposal tally.\\n /// @param _proposalId The ID of the proposal to approve.\\n /// @param _tryExecution Whether to try to execute the proposal if the tally is approved.\\n function approveTally(uint256 _proposalId, bool _tryExecution) external;\\n\\n /// @notice Executes a proposal.\\n /// @param _proposalId The ID of the proposal to execute.\\n function executeProposal(uint256 _proposalId) external;\\n}\\n\",\"keccak256\":\"0x239bf8d589c4569dc39933acab1d5fa07e323359c950778917ab9d06e830e452\",\"license\":\"AGPL-3.0-or-later\"},\"src/VocdoniProposalUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity 0.8.17;\\n\\nimport {CountersUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {IVocdoniProposal} from \\\"./IVocdoniProposal.sol\\\";\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\n\\n/// @title VocdoniProposalUpgradeable\\n/// @notice An abstract contract containing the traits and internal functionality to create and execute gasless proposals that can be inherited by upgradeable DAO plugins.\\n/// @dev Slighly modified from the original Aragon OSx ProposalUpgradeable contract.\\nabstract contract VocdoniProposalUpgradeable is IVocdoniProposal, ERC165Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n /// @notice A container for the proposal parameters.\\n /// @param securityBlock Block number used for limiting contract usage when plugin settings are updated\\n /// @param startDate The timestamp when the proposal starts.\\n /// @param voteEndDate The timestamp when the proposal ends. At this point the tally can be set.\\n /// @param tallyEndDate The timestamp when the proposal expires. Proposal can't be executed after.\\n /// @param totalVotingPower The total voting power of the proposal.\\n /// @param censusURI The URI of the census.\\n /// @param censusRoot The root of the census.\\n struct ProposalParameters {\\n uint64 securityBlock;\\n uint64 startDate;\\n uint64 voteEndDate;\\n uint64 tallyEndDate;\\n uint256 totalVotingPower;\\n string censusURI;\\n bytes32 censusRoot;\\n }\\n\\n /// @notice A container for proposal-related information.\\n /// @param executed Whether the proposal is executed or not.\\n /// @param vochainProposalId The ID of the proposal in the Vochain.\\n /// @param allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1,\\n // the proposal succeeds even if the nth action reverts. A failure map value of 0 requires every action to not revert.\\n /// @param parameters The parameters of the proposal.\\n /// @param tally The tally of the proposal.\\n /// @dev tally only supports [[Yes, No, Abstain]] schema in this order. i.e [[10, 5, 2]] means 10 Yes, 5 No, 2 Abstain.\\n /// @param approvers The approvers of the tally.\\n /// @param actions The actions to be executed when the proposal passes.\\n struct Proposal {\\n bool executed;\\n bytes32 vochainProposalId;\\n uint256 allowFailureMap;\\n ProposalParameters parameters;\\n uint256[][] tally;\\n address[] approvers;\\n IDAO.Action[] actions;\\n }\\n\\n /// @notice The incremental ID for proposals and executions.\\n CountersUpgradeable.Counter private proposalCounter;\\n\\n /// @inheritdoc IVocdoniProposal\\n function proposalCount() public view override returns (uint256) {\\n return proposalCounter.current();\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IVocdoniProposal).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @notice Creates a proposal ID.\\n /// @return proposalId The proposal ID.\\n function _createProposalId() internal returns (uint256 proposalId) {\\n proposalId = proposalCount();\\n proposalCounter.increment();\\n }\\n\\n /// @notice Internal function to execute a proposal.\\n /// @param _proposalId The ID of the proposal to be executed.\\n /// @param _actions The array of actions to be executed.\\n /// @param _allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1, the proposal succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\\n /// @return execResults The array with the results of the executed actions.\\n /// @return failureMap The failure map encoding which actions have failed.\\n function _executeProposal(\\n IDAO _dao,\\n uint256 _proposalId,\\n IDAO.Action[] memory _actions,\\n uint256 _allowFailureMap\\n ) internal virtual returns (bytes[] memory execResults, uint256 failureMap) {\\n (execResults, failureMap) = _dao.execute(bytes32(_proposalId), _actions, _allowFailureMap);\\n emit ProposalExecuted({proposalId: _proposalId});\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x5dbdcfe86440c8df1e49b8dcced80467b27203b1ba3e0ef3fe03d5f482b2e8fe\",\"license\":\"AGPL-3.0-or-later\"},\"src/VocdoniVoting.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity 0.8.17;\\n\\nimport {SafeCastUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\\\";\\nimport {IVotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\nimport {RATIO_BASE, _applyRatioCeiled, RatioOutOfBounds} from \\\"@aragon/osx/plugins/utils/Ratio.sol\\\";\\n\\nimport {VocdoniProposalUpgradeable} from \\\"./VocdoniProposalUpgradeable.sol\\\";\\nimport {IVocdoniVoting} from \\\"./IVocdoniVoting.sol\\\";\\nimport {ExecutionMultisig} from \\\"./ExecutionMultisig.sol\\\";\\n\\n/// @title VocdoniVoting\\n/// @author Vocdoni\\n/// @notice The Vocdoni gasless voting data contract for the OSX plugin.\\n/// @notice The voting Proposal is managed gasless on the Vocdoni blockchain.\\ncontract VocdoniVoting is IVocdoniVoting, VocdoniProposalUpgradeable, ExecutionMultisig {\\n using SafeCastUpgradeable for uint256;\\n\\n /// @notice The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID of the contract.\\n bytes4 internal constant VOCDONI_INTERFACE_ID =\\n this.initialize.selector ^ this.createProposal.selector;\\n\\n /// @notice The ID of the permission required to update the plugin settings.\\n bytes32 public constant UPDATE_PLUGIN_SETTINGS_PERMISSION_ID =\\n keccak256(\\\"UPDATE_PLUGIN_SETTINGS_PERMISSION\\\");\\n\\n /// @notice Emitted when the plugin settings are updated.\\n /// @param onlyExecutionMultisigProposalCreation If true, only executionMultisig members can create proposals.\\n /// @param minTallyApprovals The minimum number of approvals required for a tally to be considered accepted.\\n /// @param minParticipation The minimum participation value. Its value has to be in the interval [0, 10^6] defined by `RATIO_BASE = 10**6`.\\n /// @param supportThreshold The support threshold value. Its value has to be in the interval [0, 10^6] defined by `RATIO_BASE = 10**6`.\\n /// @param minVoteDuration The minimum duration of the vote phase of a proposal.\\n /// @param minTallyDuration The minimum duration of the tally phase of a proposal.\\n /// @param daoTokenAddress The address of the DAO token.\\n /// @param censusStrategyURI The URI containing the predicate of the census strategy to be used in the proposals. See: https://github.com/vocdoni/census3\\n /// @param minProposerVotingPower The minimum voting power required to create a proposal. Voting power is extracted from the DAO token\\n event PluginSettingsUpdated(\\n bool onlyExecutionMultisigProposalCreation,\\n uint16 indexed minTallyApprovals,\\n uint32 minParticipation,\\n uint32 supportThreshold,\\n uint64 minVoteDuration,\\n uint64 minTallyDuration,\\n address indexed daoTokenAddress,\\n string indexed censusStrategyURI,\\n uint256 minProposerVotingPower\\n );\\n\\n /// @notice A container for the Vocdoni voting plugin settings\\n /// @param onlyExecutionMultisigProposalCreation If true, only executionMultisig members can create proposals.\\n /// @param minTallyApprovals The minimum number of approvals required for the tally to be considered valid.\\n /// @param minParticipation The minimum participation value. Its value has to be in the interval [0, 10^6] defined by `RATIO_BASE = 10**6`.\\n /// @param supportThreshold The support threshold value. Its value has to be in the interval [0, 10^6] defined by `RATIO_BASE = 10**6`.\\n /// @param minVoteDuration The minimum duration of the vote phase of a proposal.\\n /// @param minTallyDuration The minimum duration of the tally phase of a proposal.\\n /// @param daoTokenAddress The address of the DAO token.\\n /// @param minProposerVotingPower The minimum voting power required to create a proposal. Voting power is extracted from the DAO token\\n /// @param censusStrategyURI The URI containing he census strategy to be used in the proposals. See: https://github.com/vocdoni/census3\\n struct PluginSettings {\\n bool onlyExecutionMultisigProposalCreation;\\n uint16 minTallyApprovals;\\n uint32 minParticipation;\\n uint32 supportThreshold;\\n uint64 minVoteDuration;\\n uint64 minTallyDuration;\\n address daoTokenAddress;\\n uint256 minProposerVotingPower;\\n string censusStrategyURI;\\n }\\n\\n /// @notice Keeps track at which block number the plugin settings have been changed the last time.\\n uint64 private lastPluginSettingsChange;\\n\\n /// @notice A mapping between proposal IDs and proposal information.\\n mapping(uint256 => Proposal) private proposals;\\n\\n /// @notice The current plugin settings.\\n PluginSettings private pluginSettings;\\n\\n /// @notice Initializes the plugin.\\n /// @param _dao The DAO address.\\n /// @param _executionMultisigAddresses The addresses of the executionMultisig.\\n /// @param _pluginSettings The initial plugin settings.\\n function initialize(\\n IDAO _dao,\\n address[] calldata _executionMultisigAddresses,\\n PluginSettings memory _pluginSettings\\n ) external initializer {\\n __ExecutionMultisig_init(_dao);\\n _addExecutionMultisigMembers(_executionMultisigAddresses);\\n _updatePluginSettings(_pluginSettings);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(\\n bytes4 _interfaceId\\n ) public view virtual override(ExecutionMultisig, VocdoniProposalUpgradeable) returns (bool) {\\n return\\n _interfaceId == VOCDONI_INTERFACE_ID ||\\n _interfaceId == type(IVocdoniVoting).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @inheritdoc ExecutionMultisig\\n /// @dev Overriden where for having access to minTallyApprovals\\n function removeExecutionMultisigMembers(\\n address[] calldata _members\\n ) external override auth(UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID) {\\n _removeExecutionMultisigMember(_members);\\n }\\n\\n /// @notice Private function for removing execution multisig members.\\n /// @param _members The addresses to remove.\\n function _removeExecutionMultisigMember(address[] calldata _members) private {\\n _guardExecutionMultisig();\\n if (_members.length == 0) {\\n revert InvalidListLength({length: _members.length});\\n }\\n\\n uint16 newAddresslistLength = uint16(addresslistLength() - _members.length);\\n\\n // Check if the new address list length would become less than the current minimum number of approvals required.\\n if (newAddresslistLength < pluginSettings.minTallyApprovals) {\\n revert MinApprovalsOutOfBounds({\\n limit: newAddresslistLength,\\n actual: pluginSettings.minTallyApprovals\\n });\\n }\\n\\n _removeAddresses(_members);\\n lastExecutionMultisigChange = uint64(block.number);\\n\\n emit ExecutionMultisigMembersRemoved({removedMembers: _members});\\n }\\n\\n /// @inheritdoc ExecutionMultisig\\n function hasApprovedTally(\\n uint256 _proposalId,\\n address _member\\n ) external view override returns (bool) {\\n return _hasApprovedTally(proposals[_proposalId], _member);\\n }\\n\\n /// @notice Internal function for checking if a member has approved a proposal tally.\\n /// @param _proposal The proposal to check.\\n /// @param _member The member to check.\\n /// @return Whether the member has approved the proposal tally.\\n function _hasApprovedTally(\\n Proposal memory _proposal,\\n address _member\\n ) internal pure returns (bool) {\\n uint approversLength = _proposal.approvers.length;\\n for (uint256 i = 0; i < approversLength; ) {\\n if (_proposal.approvers[i] == _member) {\\n return true;\\n }\\n unchecked {\\n i++;\\n }\\n }\\n return false;\\n }\\n\\n /// @notice Updates the plugin settings.\\n /// @param _pluginSettings The new plugin settings.\\n /// @dev The called must have the UPDATE_PLUGIN_SETTINGS_PERMISSION_ID permission.\\n function updatePluginSettings(\\n PluginSettings memory _pluginSettings\\n ) external auth(UPDATE_PLUGIN_SETTINGS_PERMISSION_ID) {\\n _updatePluginSettings(_pluginSettings);\\n }\\n\\n /// @notice Internal function for updating the plugin settings.\\n /// @param _pluginSettings The new plugin settings.\\n function _updatePluginSettings(PluginSettings memory _pluginSettings) private {\\n _guardPluginSettings();\\n\\n if (_pluginSettings.supportThreshold > RATIO_BASE - 1) {\\n revert RatioOutOfBounds({\\n limit: RATIO_BASE - 1,\\n actual: _pluginSettings.supportThreshold\\n });\\n }\\n\\n // Require the minimum participation value to be in the interval [0, 10^6], because `>=` comparision is used in the participation criterion.\\n if (_pluginSettings.minParticipation > RATIO_BASE) {\\n revert RatioOutOfBounds({limit: RATIO_BASE, actual: _pluginSettings.minParticipation});\\n }\\n\\n if (_pluginSettings.minVoteDuration > 365 days) {\\n revert VoteDurationOutOfBounds({\\n limit: 365 days,\\n actual: _pluginSettings.minVoteDuration\\n });\\n }\\n\\n if (_pluginSettings.minVoteDuration < 5 minutes) {\\n revert VoteDurationOutOfBounds({\\n limit: 60 minutes,\\n actual: _pluginSettings.minVoteDuration\\n });\\n }\\n\\n if (_pluginSettings.minTallyDuration > 365 days) {\\n revert TallyDurationOutOfBounds({\\n limit: 365 days,\\n actual: _pluginSettings.minTallyDuration\\n });\\n }\\n\\n if (_pluginSettings.minTallyDuration < 5 minutes) {\\n revert TallyDurationOutOfBounds({\\n limit: 60 minutes,\\n actual: _pluginSettings.minTallyDuration\\n });\\n }\\n\\n // update plugin settings\\n pluginSettings = _pluginSettings;\\n lastPluginSettingsChange = uint64(block.number);\\n\\n emit PluginSettingsUpdated({\\n onlyExecutionMultisigProposalCreation: _pluginSettings\\n .onlyExecutionMultisigProposalCreation,\\n minTallyApprovals: _pluginSettings.minTallyApprovals,\\n minVoteDuration: _pluginSettings.minVoteDuration,\\n minTallyDuration: _pluginSettings.minTallyDuration,\\n minParticipation: _pluginSettings.minParticipation,\\n supportThreshold: _pluginSettings.supportThreshold,\\n daoTokenAddress: _pluginSettings.daoTokenAddress,\\n censusStrategyURI: _pluginSettings.censusStrategyURI,\\n minProposerVotingPower: _pluginSettings.minProposerVotingPower\\n });\\n }\\n\\n /// @notice Returns a proposal.\\n /// @param _proposalId The ID of the proposal to return.\\n /// @return executed Whether the proposal is executed or not.\\n /// @return approvers The approvers of the tally.\\n /// @return vochainProposalId The ID of the proposal in the Vochain.\\n /// @return parameters The parameters of the proposal.\\n /// @return allowFailureMap The allow failure map of the proposal.\\n /// @return tally The tally of the proposal.\\n /// @return actions The actions of the proposal.\\n function getProposal(\\n uint256 _proposalId\\n )\\n public\\n view\\n returns (\\n bool executed,\\n address[] memory approvers,\\n bytes32 vochainProposalId,\\n ProposalParameters memory parameters,\\n uint256 allowFailureMap,\\n uint256[][] memory tally,\\n IDAO.Action[] memory actions\\n )\\n {\\n Proposal memory proposal = proposals[_proposalId];\\n executed = proposal.executed;\\n approvers = proposal.approvers;\\n vochainProposalId = proposal.vochainProposalId;\\n parameters = proposal.parameters;\\n allowFailureMap = proposal.allowFailureMap;\\n tally = proposal.tally;\\n actions = proposal.actions;\\n }\\n\\n /// @notice Internal function for creating a proposal.\\n /// @param _vochainProposalId The Vocdoni proposal ID.\\n /// @param _allowFailureMap The allow failure map of the proposal.\\n /// @param _parameters The parameters of the proposal.\\n /// @param _actions The actions of the proposal.\\n /// @return The ID of the created proposal.\\n function createProposal(\\n bytes32 _vochainProposalId,\\n uint256 _allowFailureMap,\\n ProposalParameters memory _parameters,\\n IDAO.Action[] memory _actions\\n ) external returns (uint256) {\\n _guardExecutionMultisig();\\n _guardPluginSettings();\\n\\n PluginSettings memory _pluginSettings = pluginSettings;\\n address sender = _msgSender();\\n\\n if (\\n _pluginSettings.onlyExecutionMultisigProposalCreation &&\\n !_isExecutionMultisigMember(sender)\\n ) {\\n revert OnlyExecutionMultisig({sender: sender});\\n }\\n\\n if (_pluginSettings.minProposerVotingPower != 0) {\\n // Because of the checks in `VocdoniVotingSetup`, we can assume that `votingToken` is an [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.\\n // It can be the case where the token does not implement the getVotes() function, so we need to handle the call as a possible failure to ignore.\\n uint256 votes = _tryGetVotes(sender);\\n uint256 balance = IERC20Upgradeable(_pluginSettings.daoTokenAddress).balanceOf(sender);\\n\\n if (\\n votes < _pluginSettings.minProposerVotingPower &&\\n balance < _pluginSettings.minProposerVotingPower\\n ) {\\n revert NotEnoughVotingPower({required: _pluginSettings.minProposerVotingPower});\\n }\\n }\\n\\n (\\n _parameters.startDate,\\n _parameters.voteEndDate,\\n _parameters.tallyEndDate\\n ) = _validateProposalDates(\\n _parameters.startDate,\\n _parameters.voteEndDate,\\n _parameters.tallyEndDate\\n );\\n\\n if (_parameters.totalVotingPower == 0) {\\n revert InvalidTotalVotingPower({totalVotingPower: _parameters.totalVotingPower});\\n }\\n\\n uint256 _proposalId = _createProposalId();\\n Proposal storage proposal = proposals[_proposalId];\\n\\n proposal.vochainProposalId = _vochainProposalId;\\n proposal.parameters.startDate = _parameters.startDate;\\n proposal.parameters.voteEndDate = _parameters.voteEndDate;\\n proposal.parameters.tallyEndDate = _parameters.tallyEndDate;\\n proposal.parameters.totalVotingPower = _parameters.totalVotingPower;\\n proposal.parameters.censusURI = _parameters.censusURI;\\n proposal.parameters.censusRoot = _parameters.censusRoot;\\n proposal.parameters.securityBlock = block.number.toUint64();\\n proposal.allowFailureMap = _allowFailureMap;\\n\\n for (uint256 i = 0; i < _actions.length; ) {\\n proposal.actions.push(_actions[i]);\\n unchecked {\\n i++;\\n }\\n }\\n\\n emit ProposalCreated(\\n _proposalId,\\n _vochainProposalId,\\n sender,\\n _parameters.startDate,\\n _parameters.voteEndDate,\\n _parameters.tallyEndDate,\\n _actions,\\n _allowFailureMap\\n );\\n\\n return _proposalId;\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function setTally(uint256 _proposalId, uint256[][] memory _tally) public override {\\n _setTally(_proposalId, _tally);\\n }\\n\\n /// @notice Internal function for setting the tally of a given proposal.\\n /// @param _proposalId The ID of the proposal to set the tally of.\\n /// @param _tally The tally to set.\\n /// @dev The caller must be a executionMultisig member.\\n function _setTally(uint256 _proposalId, uint256[][] memory _tally) internal {\\n _guardExecutionMultisig();\\n _guardPluginSettings();\\n address sender = _msgSender();\\n\\n if (!_isExecutionMultisigMember(sender)) {\\n revert OnlyExecutionMultisig({sender: sender});\\n }\\n\\n Proposal storage proposal = proposals[_proposalId];\\n\\n if (proposal.executed) {\\n revert ProposalAlreadyExecuted({proposalId: _proposalId});\\n }\\n\\n if (!_isProposalOnTallyPhase(proposal)) {\\n revert ProposalNotInTallyPhase({\\n voteEndDate: proposal.parameters.voteEndDate,\\n tallyEndDate: proposal.parameters.tallyEndDate,\\n currentTimestamp: block.timestamp\\n });\\n }\\n\\n // only supported tally is [[Yes, No, Abstain]]\\n if (_tally.length != 1 || _tally[0].length != 3) {\\n revert InvalidTally({tally: _tally});\\n }\\n\\n // tally already set\\n if (proposal.tally.length != 0) {\\n // check proposal not already approved\\n if (proposal.approvers.length >= pluginSettings.minTallyApprovals) {\\n revert TallyAlreadyApproved({\\n approvals: proposal.approvers.length,\\n minApprovals: pluginSettings.minTallyApprovals\\n });\\n }\\n // check if the new tally is different\\n if (\\n _tally[0][0] == proposal.tally[0][0] &&\\n _tally[0][1] == proposal.tally[0][1] &&\\n _tally[0][2] == proposal.tally[0][2]\\n ) {\\n revert InvalidTally({tally: _tally});\\n }\\n // reset approvers\\n delete proposal.approvers;\\n }\\n\\n proposal.tally = _tally;\\n proposal.approvers.push(sender);\\n\\n emit TallySet({proposalId: _proposalId, tally: _tally});\\n emit TallyApproval({proposalId: _proposalId, approver: sender});\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function approveTally(uint256 _proposalId, bool _tryExecution) external override {\\n return _approveTally(_proposalId, _tryExecution);\\n }\\n\\n /// @notice Internal function for approving a proposal tally.\\n /// @param _proposalId The ID of the proposal to approve.\\n /// @param _tryExecution Whether to try to execute the proposal after approving the tally.\\n function _approveTally(uint256 _proposalId, bool _tryExecution) internal {\\n _guardExecutionMultisig();\\n _guardPluginSettings();\\n\\n address sender = _msgSender();\\n\\n if (!_isExecutionMultisigMember(sender)) {\\n revert OnlyExecutionMultisig({sender: sender});\\n }\\n\\n Proposal storage proposal = proposals[_proposalId];\\n\\n // also checks that proposal is in tally phase, as the tally cannot be set otherwise\\n if (proposal.tally.length == 0) {\\n revert InvalidTally(proposal.tally);\\n }\\n\\n if (_hasApprovedTally(proposal, sender)) {\\n revert TallyAlreadyApprovedBySender({sender: sender});\\n }\\n\\n if (proposal.approvers.length >= pluginSettings.minTallyApprovals) {\\n revert TallyAlreadyApproved({\\n approvals: proposal.approvers.length,\\n minApprovals: pluginSettings.minTallyApprovals\\n });\\n }\\n\\n // if executionMultisig changed since proposal creation, the proposal approvals of the previous executionMultisig members are not valid\\n if (proposal.parameters.securityBlock < lastExecutionMultisigChange) {\\n address[] memory newApprovers = new address[](0);\\n // newApprovers are the oldApprovers list without the non executionMultisig members at the current block\\n uint8 newApproversCount = 0;\\n uint approversLength = proposal.approvers.length;\\n for (uint256 i = 0; i < approversLength; ) {\\n address oldApprover = proposal.approvers[i];\\n if (\\n _isExecutionMultisigMember(oldApprover) &&\\n _hasApprovedTally(proposal, oldApprover)\\n ) {\\n newApprovers[newApproversCount] = oldApprover;\\n unchecked {\\n newApproversCount++;\\n }\\n }\\n unchecked {\\n i++;\\n }\\n }\\n proposal.approvers = newApprovers;\\n proposal.parameters.securityBlock = lastExecutionMultisigChange;\\n }\\n\\n proposal.approvers.push(sender);\\n\\n emit TallyApproval({proposalId: _proposalId, approver: sender});\\n\\n if (_tryExecution) {\\n _checkTallyAndExecute(_proposalId);\\n }\\n }\\n\\n /// @inheritdoc IVocdoniVoting\\n function executeProposal(uint256 _proposalId) public override {\\n _guardExecutionMultisig();\\n _guardPluginSettings();\\n\\n _checkTallyAndExecute(_proposalId);\\n }\\n\\n /// @notice Internal function to check if a proposal is on the tally phase.\\n /// @param _proposal The proposal to check\\n function _isProposalOnTallyPhase(Proposal memory _proposal) internal view returns (bool) {\\n uint64 currentBlockTimestamp = uint64(block.timestamp);\\n /// [... startDate ............ voteEndDate ............ tallyEndDate ...]\\n /// [............. Voting phase ............ Tally phase ................]\\n if (\\n _proposal.parameters.startDate < currentBlockTimestamp &&\\n _proposal.parameters.voteEndDate < currentBlockTimestamp - 1 &&\\n _proposal.parameters.tallyEndDate > currentBlockTimestamp\\n ) {\\n return true;\\n }\\n return false;\\n }\\n\\n /// @notice Internal function to check the tally and execute a proposal if:\\n /// - The support threshold is reached\\n /// - The minimum participation is reached.\\n /// - Enough execution multisig members have approved the tally.\\n /// - Proposal is not already executed.\\n /// - The tally is valid.\\n /// - The proposal is in the tally phase.\\n /// @param _proposalId The ID of the proposal to check.\\n function _checkTallyAndExecute(uint256 _proposalId) internal {\\n Proposal memory proposal = proposals[_proposalId];\\n\\n if (proposal.executed) {\\n revert ProposalAlreadyExecuted({proposalId: _proposalId});\\n }\\n\\n // also checks that proposal is in tally phase, as the tally cannot be set otherwise\\n if (proposal.tally.length == 0) {\\n revert InvalidTally({tally: proposal.tally});\\n }\\n\\n if (proposal.parameters.tallyEndDate < block.timestamp) {\\n revert ProposalNotInTallyPhase({\\n voteEndDate: proposal.parameters.voteEndDate,\\n tallyEndDate: proposal.parameters.tallyEndDate,\\n currentTimestamp: block.timestamp\\n });\\n }\\n\\n if (proposal.approvers.length < pluginSettings.minTallyApprovals) {\\n revert NotEnoughApprovals({\\n minApprovals: pluginSettings.minTallyApprovals,\\n actualApprovals: proposal.approvers.length.toUint16()\\n });\\n }\\n\\n uint256 currentVotingPower = proposal.tally[0][0] +\\n proposal.tally[0][1] +\\n proposal.tally[0][2];\\n\\n uint256 minVotingPower = _applyRatioCeiled(\\n proposal.parameters.totalVotingPower,\\n pluginSettings.minParticipation\\n );\\n\\n if (minVotingPower > currentVotingPower) {\\n revert MinParticipationNotReached({\\n currentVotingPower: currentVotingPower,\\n minVotingPower: minVotingPower\\n });\\n }\\n\\n uint256 yesRatioPart = (RATIO_BASE - pluginSettings.supportThreshold) *\\n proposal.tally[0][0];\\n uint256 noRatioPart = pluginSettings.supportThreshold * proposal.tally[0][1];\\n if (yesRatioPart <= noRatioPart) {\\n revert SupportThresholdNotReached({\\n currentSupport: _getCurrentSupport(proposal.tally),\\n supportThreshold: pluginSettings.supportThreshold\\n });\\n }\\n\\n proposals[_proposalId].executed = true;\\n _executeProposal(dao(), _proposalId, proposal.actions, proposal.allowFailureMap);\\n }\\n\\n /// @notice Internal function calculating the current support of a proposal\\n /// @param _tally The tally of the proposal.\\n /// @return The current support of the proposal.\\n function _getCurrentSupport(uint256[][] memory _tally) internal pure returns (uint256) {\\n return (_tally[0][0] * RATIO_BASE) / (_tally[0][0] + _tally[0][1]);\\n }\\n\\n /// @notice Internal function for validating the proposal dates.\\n /// If the start date is 0, it is set to the current block timestamp.\\n /// If the end vote date is 0, it is set to the start date + min vote duration.\\n /// If the tally end date is 0, it is set to the end date + min tally duration.\\n /// @param _startDate The start date of the proposal.\\n /// @param _voteEndDate The vote end date of the proposal.\\n /// @param _tallyEndDate The tally end date of the proposal.\\n /// @return startDate The validated start date.\\n /// @return voteEndDate The validated vote end date.\\n /// @return tallyEndDate The validated tally end date.\\n function _validateProposalDates(\\n uint64 _startDate,\\n uint64 _voteEndDate,\\n uint64 _tallyEndDate\\n ) internal view returns (uint64 startDate, uint64 voteEndDate, uint64 tallyEndDate) {\\n uint64 currentBlockTimestamp = block.timestamp.toUint64();\\n // check proposal start date and set it to the current block timestamp if it is 0\\n if (_startDate == 0) {\\n startDate = currentBlockTimestamp;\\n } else {\\n startDate = _startDate;\\n if (startDate < currentBlockTimestamp) {\\n revert InvalidStartDate({limit: currentBlockTimestamp, actual: startDate});\\n }\\n }\\n // check proposal end date and set it to the start date + min duration if it is 0\\n uint64 earliestVoteEndDate = startDate + pluginSettings.minVoteDuration;\\n // Since `minVoteDuration` is limited to 1 year, `startDate + minVoteDuration`\\n // can only overflow if the `startDate` is after `type(uint64).max - minVoteDuration`.\\n // In this case, the proposal creation will revert and another date can be picked.\\n if (_voteEndDate == 0) {\\n voteEndDate = earliestVoteEndDate;\\n } else {\\n voteEndDate = _voteEndDate;\\n if (voteEndDate < earliestVoteEndDate) {\\n revert InvalidVoteEndDate({limit: earliestVoteEndDate, actual: voteEndDate});\\n }\\n }\\n\\n uint64 earliestTallyEndDate = voteEndDate + pluginSettings.minTallyDuration;\\n if (_tallyEndDate == 0) {\\n tallyEndDate = earliestTallyEndDate;\\n } else {\\n tallyEndDate = _tallyEndDate;\\n if (tallyEndDate < earliestTallyEndDate) {\\n revert InvalidTallyEndDate({limit: earliestTallyEndDate, actual: tallyEndDate});\\n }\\n }\\n }\\n\\n /// @notice Gets the plugin settings.\\n /// @return The plugin settings.\\n function getPluginSettings() public view returns (PluginSettings memory) {\\n return pluginSettings;\\n }\\n\\n /// @notice Guard checks that processes key updates are not executed in the same block\\n /// where the plugin settings changed.\\n function _guardPluginSettings() internal view {\\n if (lastPluginSettingsChange == uint64(block.number)) {\\n revert PluginSettingsUpdatedTooRecently({lastUpdate: lastPluginSettingsChange});\\n }\\n }\\n\\n /// @notice Returns the last block number where the plugin settings changed.\\n /// @return The last block number where the plugin settings changed.\\n function getLastPluginSettingsChange() external view returns (uint64) {\\n return lastPluginSettingsChange;\\n }\\n\\n /// @notice Handles the getVotes() call possible failure.\\n /// @param voter The address of the user.\\n /// @return uint256 The votes of the user.\\n function _tryGetVotes(address voter) internal view returns (uint256) {\\n (bool success, bytes memory data) = pluginSettings.daoTokenAddress.staticcall(\\n abi.encodeCall(IVotesUpgradeable.getVotes, voter)\\n );\\n if (success && data.length == 32) {\\n // Decode and return the votes if the call was successful and data length is correct\\n return abi.decode(data, (uint256));\\n } else {\\n // If the call failed or returned unexpected data, handle as error\\n return 0;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xddd6828df5330d68e045e44e8582e50620df6d440394885489017fd8f81f7ad1\",\"license\":\"AGPL-3.0-or-later\"},\"src/VocdoniVotingSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity 0.8.17;\\n\\nimport {IDAO} from \\\"@aragon/osx/core/dao/IDAO.sol\\\";\\nimport {DAO} from \\\"@aragon/osx/core/dao/DAO.sol\\\";\\nimport {PermissionLib} from \\\"@aragon/osx/core/permission/PermissionLib.sol\\\";\\nimport {PluginSetup, IPluginSetup} from \\\"@aragon/osx/framework/plugin/setup/PluginSetup.sol\\\";\\nimport {VocdoniVoting} from \\\"./VocdoniVoting.sol\\\";\\n\\nimport {Clones} from \\\"@openzeppelin/contracts/proxy/Clones.sol\\\";\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport {ERC165Checker} from \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {IVotesUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\\\";\\n\\nimport {GovernanceERC20} from \\\"@aragon/osx/token/ERC20/governance/GovernanceERC20.sol\\\";\\nimport {GovernanceWrappedERC20} from \\\"@aragon/osx/token/ERC20/governance/GovernanceWrappedERC20.sol\\\";\\nimport {IGovernanceWrappedERC20} from \\\"@aragon/osx/token/ERC20/governance/IGovernanceWrappedERC20.sol\\\";\\n\\n/// @title VocdoniVotingSetup\\n/// @author Vocdoni\\n/// @notice The setup contract of the `VocdoniVoting` plugin.\\ncontract VocdoniVotingSetup is PluginSetup {\\n using Address for address;\\n using Clones for address;\\n using ERC165Checker for address;\\n\\n /// @notice The address of `VocdoniVoting` plugin logic contract to be used in creating proxy contracts.\\n VocdoniVoting private immutable vocdoniVoting;\\n\\n /// @notice The address of the `GovernanceERC20` base contract.\\n address public immutable governanceERC20Base;\\n\\n /// @notice The address of the `GovernanceWrappedERC20` base contract.\\n address public immutable governanceWrappedERC20Base;\\n\\n /// @notice The token settings struct.\\n /// @param addr The token address. If this is `address(0)`, a new `GovernanceERC20` token is deployed. If not, the existing token is wrapped as an `GovernanceWrappedERC20`.\\n /// @param name The token name. This parameter is only relevant if the token address is `address(0)`.\\n /// @param symbol The token symbol. This parameter is only relevant if the token address is `address(0)`.\\n struct TokenSettings {\\n address addr;\\n string name;\\n string symbol;\\n }\\n\\n /// @notice Thrown if token address is passed which is not a token.\\n /// @param token The token address\\n error TokenNotContract(address token);\\n\\n /// @notice Thrown if token address is not ERC20.\\n /// @param token The token address\\n error TokenNotERC20(address token);\\n\\n /// @notice Thrown if passed helpers array is of wrong length.\\n /// @param length The array length of passed helpers.\\n error WrongHelpersArrayLength(uint256 length);\\n\\n /// @notice The contract constructor, that deploys the `VocdoniVoting` plugin logic contract.\\n constructor(\\n GovernanceERC20 _governanceERC20Base,\\n GovernanceWrappedERC20 _governanceWrappedERC20Base\\n ) {\\n governanceERC20Base = address(_governanceERC20Base);\\n governanceWrappedERC20Base = address(_governanceWrappedERC20Base);\\n vocdoniVoting = new VocdoniVoting();\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function prepareInstallation(\\n address _dao,\\n bytes calldata _data\\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData) {\\n // Decode `_data` to extract the params needed for deploying and initializing `VocdoniVoting` plugin.\\n (\\n address[] memory executionMultisig,\\n VocdoniVoting.PluginSettings memory pluginSettings,\\n TokenSettings memory tokenSettings,\\n // only used for GovernanceERC20(token is not passed)\\n GovernanceERC20.MintSettings memory mintSettings\\n ) = abi.decode(\\n _data,\\n (\\n address[],\\n VocdoniVoting.PluginSettings,\\n TokenSettings,\\n GovernanceERC20.MintSettings\\n )\\n );\\n\\n address token = tokenSettings.addr;\\n\\n // Prepare helpers.\\n address[] memory helpers = new address[](1);\\n\\n if (token != address(0)) {\\n if (!token.isContract()) {\\n revert TokenNotContract(token);\\n }\\n\\n if (!_isERC20(token)) {\\n revert TokenNotERC20(token);\\n }\\n } else {\\n // Clone a `GovernanceERC20`.\\n token = governanceERC20Base.clone();\\n GovernanceERC20(token).initialize(\\n IDAO(_dao),\\n tokenSettings.name,\\n tokenSettings.symbol,\\n mintSettings\\n );\\n }\\n\\n helpers[0] = token;\\n\\n pluginSettings.daoTokenAddress = token;\\n\\n // Prepare and Deploy the plugin proxy.\\n plugin = createERC1967Proxy(\\n address(vocdoniVoting),\\n abi.encodeCall(\\n VocdoniVoting.initialize,\\n (IDAO(_dao), executionMultisig, pluginSettings)\\n )\\n );\\n\\n // Prepare permissions\\n PermissionLib.MultiTargetPermission[]\\n memory permissions = new PermissionLib.MultiTargetPermission[](\\n tokenSettings.addr != address(0) ? 4 : 5\\n );\\n\\n // Set permissions to be granted.\\n // Grant the list of permissions of the plugin to the DAO.\\n permissions[0] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPDATE_PLUGIN_SETTINGS_PERMISSION_ID()\\n );\\n\\n permissions[1] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID()\\n );\\n\\n permissions[2] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPGRADE_PLUGIN_PERMISSION_ID()\\n );\\n\\n // Grant `EXECUTE_PERMISSION` of the DAO to the plugin.\\n permissions[3] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n _dao,\\n plugin,\\n PermissionLib.NO_CONDITION,\\n DAO(payable(_dao)).EXECUTE_PERMISSION_ID()\\n );\\n\\n if (tokenSettings.addr == address(0)) {\\n bytes32 tokenMintPermission = GovernanceERC20(token).MINT_PERMISSION_ID();\\n\\n permissions[4] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Grant,\\n token,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n tokenMintPermission\\n );\\n }\\n\\n preparedSetupData.helpers = helpers;\\n preparedSetupData.permissions = permissions;\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function prepareUninstallation(\\n address _dao,\\n SetupPayload calldata _payload\\n ) external view returns (PermissionLib.MultiTargetPermission[] memory permissions) {\\n // Prepare permissions.\\n uint256 helperLength = _payload.currentHelpers.length;\\n if (helperLength != 1) {\\n revert WrongHelpersArrayLength({length: helperLength});\\n }\\n\\n // token can be either GovernanceERC20, GovernanceWrappedERC20, or IVotesUpgradeable, which\\n // does not follow the GovernanceERC20 and GovernanceWrappedERC20 standard.\\n address token = _payload.currentHelpers[0];\\n\\n bool[] memory supportedIds = _getTokenInterfaceIds(token);\\n\\n bool isGovernanceERC20 = supportedIds[0] && supportedIds[1] && !supportedIds[2];\\n\\n permissions = new PermissionLib.MultiTargetPermission[](isGovernanceERC20 ? 5 : 4);\\n\\n // Set permissions to be Revoked.\\n permissions[0] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n _payload.plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPDATE_PLUGIN_SETTINGS_PERMISSION_ID()\\n );\\n\\n permissions[1] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n _payload.plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID()\\n );\\n\\n permissions[2] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n _payload.plugin,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n vocdoniVoting.UPGRADE_PLUGIN_PERMISSION_ID()\\n );\\n\\n permissions[3] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n _dao,\\n _payload.plugin,\\n PermissionLib.NO_CONDITION,\\n DAO(payable(_dao)).EXECUTE_PERMISSION_ID()\\n );\\n\\n // Revocation of permission is necessary only if the deployed token is GovernanceERC20,\\n // as GovernanceWrapped does not possess this permission. Only return the following\\n // if it's type of GovernanceERC20, otherwise revoking this permission wouldn't have any effect.\\n if (isGovernanceERC20) {\\n permissions[4] = PermissionLib.MultiTargetPermission(\\n PermissionLib.Operation.Revoke,\\n token,\\n _dao,\\n PermissionLib.NO_CONDITION,\\n GovernanceERC20(token).MINT_PERMISSION_ID()\\n );\\n }\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function implementation() external view virtual override returns (address) {\\n return address(vocdoniVoting);\\n }\\n\\n /// @notice Retrieves the interface identifiers supported by the token contract.\\n /// @dev It is crucial to verify if the provided token address represents a valid contract before using the below.\\n /// @param token The token address\\n function _getTokenInterfaceIds(address token) private view returns (bool[] memory) {\\n bytes4[] memory interfaceIds = new bytes4[](3);\\n interfaceIds[0] = type(IERC20Upgradeable).interfaceId;\\n interfaceIds[1] = type(IVotesUpgradeable).interfaceId;\\n interfaceIds[2] = type(IGovernanceWrappedERC20).interfaceId;\\n return token.getSupportedInterfaces(interfaceIds);\\n }\\n\\n /// @notice Unsatisfiably determines if the contract is an ERC20 token.\\n /// @dev It's important to first check whether token is a contract prior to this call.\\n /// @param token The token address\\n function _isERC20(address token) private view returns (bool) {\\n (bool success, bytes memory data) = token.staticcall(\\n abi.encodeCall(IERC20Upgradeable.balanceOf, (address(this)))\\n );\\n return success && data.length == 0x20;\\n }\\n}\\n\",\"keccak256\":\"0x83a87ad5fda9bf1f781dcf1245b61493bd0c564773053c5bfcba46f5f20afaef\",\"license\":\"AGPL-3.0-or-later\"}},\"version\":1}", + "bytecode": "0x60e06040523480156200001157600080fd5b50604051620084c2380380620084c28339810160408190526200003491620000af565b6001600160a01b0380831660a052811660c052604051620000559062000088565b604051809103906000f08015801562000072573d6000803e3d6000fd5b506001600160a01b031660805250620000ee9050565b615d35806200278d83390190565b6001600160a01b0381168114620000ac57600080fd5b50565b60008060408385031215620000c357600080fd5b8251620000d08162000096565b6020840151909250620000e38162000096565b809150509250929050565b60805160a05160c05161263962000154600039600061017301526000818160be015261093801526000818160fb015281816103d2015281816104cc015281816105c601528181610a1701528181610b5c01528181610c460152610d3001526126396000f3fe60806040523480156200001157600080fd5b5060043610620000875760003560e01c80639cb0a12411620000625780639cb0a1241462000120578063a8a9c29e1462000146578063e89b6b91146200016d578063f10832f1146200019557600080fd5b806301ffc9a7146200008c578063599cb1a614620000b85780635c60da1b14620000f9575b600080fd5b620000a36200009d366004620013cc565b620001bc565b60405190151581526020015b60405180910390f35b620000e07f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001620000af565b7f0000000000000000000000000000000000000000000000000000000000000000620000e0565b620001376200013136600462001429565b620001f4565b604051620000af9190620014e4565b6200015d6200015736600462001544565b62000827565b604051620000af929190620016b0565b620000e07f000000000000000000000000000000000000000000000000000000000000000081565b620001ac620001a6366004620016e2565b6200084f565b604051620000af9291906200176c565b60006001600160e01b0319821663099718b560e41b1480620001ee57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600062000207602084018462001790565b915050600181146200023457604051633c53187f60e21b8152600481018290526024015b60405180910390fd5b600062000245602085018562001790565b6000818110620002595762000259620017e4565b9050602002016020810190620002709190620017fa565b905060006200027f8262000f8c565b9050600081600081518110620002995762000299620017e4565b60200260200101518015620002c8575081600181518110620002bf57620002bf620017e4565b60200260200101515b8015620002f0575081600281518110620002e657620002e6620017e4565b6020026020010151155b9050806200030057600462000303565b60055b60ff1667ffffffffffffffff81111562000321576200032162001818565b6040519080825280602002602001820160405280156200037c57816020015b6040805160a081018252600080825260208083018290529282018190526060820181905260808201528252600019909201910181620003405790505b506040805160a0810190915260018152909550602080820190620003a390890189620017fa565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2c801b66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200042f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200045591906200182e565b815250856000815181106200046e576200046e620017e4565b60209081029190910101526040805160a0810190915280600181526020908101906200049d90890189620017fa565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e91ddf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000529573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200054f91906200182e565b81525085600181518110620005685762000568620017e4565b60209081029190910101526040805160a0810190915280600181526020908101906200059790890189620017fa565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c9c4bfca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000623573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200064991906200182e565b81525085600281518110620006625762000662620017e4565b60209081029190910101526040805160a081019091528060018152602001886001600160a01b03168152602001876000016020810190620006a49190620017fa565b6001600160a01b0316815260200160006001600160a01b03168152602001886001600160a01b0316630729d0546040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000701573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200072791906200182e565b81525085600381518110620007405762000740620017e4565b602002602001018190525080156200081d576040805160a081019091528060018152602001846001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b03168152602001846001600160a01b031663b2d2989c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620007d2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007f891906200182e565b81525085600481518110620008115762000811620017e4565b60200260200101819052505b5050505092915050565b606062000847604051806040016040528060608152602001606081525090565b935093915050565b60006200086f604051806040016040528060608152602001606081525090565b6000808080620008828789018962001b97565b8151604080516001808252818301909252959950939750919550935091600091602080830190803683370190505090506001600160a01b0382161562000932576001600160a01b0382163b620008f7576040516318aca2db60e01b81526001600160a01b03831660048201526024016200022b565b620009028262001085565b6200092c5760405163fa8925f160e01b81526001600160a01b03831660048201526024016200022b565b620009d9565b620009667f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662001138565b9150816001600160a01b031663dab27fa98c86602001518760400151876040518563ffffffff1660e01b8152600401620009a4949392919062001d17565b600060405180830381600087803b158015620009bf57600080fd5b505af1158015620009d4573d6000803e3d6000fd5b505050505b8181600081518110620009f057620009f0620017e4565b6001600160a01b039283166020918202929092010152821660c086015260405162000a7b907f00000000000000000000000000000000000000000000000000000000000000009062000a4b908e908a908a9060240162001dbf565b60408051601f198184030181529190526020810180516001600160e01b031663a727afa360e01b179052620011db565b84519098506000906001600160a01b031662000a9957600562000a9c565b60045b60ff1667ffffffffffffffff81111562000aba5762000aba62001818565b60405190808252806020026020018201604052801562000b1557816020015b6040805160a08101825260008082526020808301829052928201819052606082018190526080820152825260001990920191018162000ad95790505b506040805160a0810190915290915080600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2c801b66040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000bb9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bdf91906200182e565b8152508160008151811062000bf85762000bf8620017e4565b60209081029190910101526040805160a0810190915280600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e91ddf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000ca3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cc991906200182e565b8152508160018151811062000ce25762000ce2620017e4565b60209081029190910101526040805160a0810190915280600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c9c4bfca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000d8d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000db391906200182e565b8152508160028151811062000dcc5762000dcc620017e4565b60209081029190910101526040805160a0810190915280600081526020018d6001600160a01b031681526020018a6001600160a01b0316815260200160006001600160a01b031681526020018d6001600160a01b0316630729d0546040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000e57573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e7d91906200182e565b8152508160038151811062000e965762000e96620017e4565b602090810291909101015284516001600160a01b031662000f74576000836001600160a01b031663b2d2989c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000ef2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f1891906200182e565b6040805160a0810190915290915080600081526001600160a01b0380871660208301528f1660408201526000606082015260800182905282518390600490811062000f675762000f67620017e4565b6020026020010181905250505b90875260208701525094989397509295505050505050565b60408051600380825260808201909252606091600091906020820184803683370190505090506336372b0760e01b8160008151811062000fd05762000fd0620017e4565b60200260200101906001600160e01b03191690816001600160e01b03191681525050637487d9fb60e11b81600181518110620010105762001010620017e4565b60200260200101906001600160e01b03191690816001600160e01b0319168152505063078984cd60e11b81600281518110620010505762001050620017e4565b6001600160e01b0319909216602092830291909101909101526200107e6001600160a01b03841682620011e9565b9392505050565b604051306024820152600090819081906001600160a01b0385169060440160408051601f198184030181529181526020820180516001600160e01b03166370a0823160e01b17905251620010da919062001ec4565b600060405180830381855afa9150503d806000811462001117576040519150601f19603f3d011682016040523d82523d6000602084013e6200111c565b606091505b509150915081801562001130575080516020145b949350505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b038116620011d65760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c65640000000000000000000060448201526064016200022b565b919050565b60006200107e8383620012bf565b60606000825167ffffffffffffffff8111156200120a576200120a62001818565b60405190808252806020026020018201604052801562001234578160200160208202803683370190505b5090506200124284620012fb565b156200107e5760005b8351811015620012b7576200127d858583815181106200126f576200126f620017e4565b602002602001015162001333565b828281518110620012925762001292620017e4565b9115156020928302919091019091015280620012ae8162001ee2565b9150506200124b565b509392505050565b60008282604051620012d190620013be565b620012de92919062001f0a565b604051809103906000f080158015620012b7573d6000803e3d6000fd5b600062001310826301ffc9a760e01b62001333565b8015620001ee57506200132c826001600160e01b031962001333565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d91506000519050828015620013a6575060208210155b8015620013b35750600081115b979650505050505050565b6106fe8062001f2f83390190565b600060208284031215620013df57600080fd5b81356001600160e01b0319811681146200107e57600080fd5b80356001600160a01b0381168114620011d657600080fd5b6000606082840312156200142357600080fd5b50919050565b600080604083850312156200143d57600080fd5b6200144883620013f8565b9150602083013567ffffffffffffffff8111156200146557600080fd5b620014738582860162001410565b9150509250929050565b6000815160038110620014a057634e487b7160e01b600052602160045260246000fd5b8352506020818101516001600160a01b0390811691840191909152604080830151821690840152606080830151909116908301526080908101519082015260a00190565b6020808252825182820181905260009190848201906040850190845b818110156200152557620015168385516200147d565b93850193925060010162001500565b50909695505050505050565b803561ffff81168114620011d657600080fd5b6000806000606084860312156200155a57600080fd5b6200156584620013f8565b9250620015756020850162001531565b9150604084013567ffffffffffffffff8111156200159257600080fd5b620015a08682870162001410565b9150509250925092565b60005b83811015620015c7578181015183820152602001620015ad565b50506000910152565b60008151808452620015ea816020860160208601620015aa565b601f01601f19169290920160200192915050565b600081518084526020808501945080840160005b83811015620016395781516001600160a01b03168752958201959082019060010162001612565b509495945050505050565b60008151604084526200165b6040850182620015fe565b60208481015186830387830152805180845290820193509091600091908301905b80831015620016a557620016928286516200147d565b915083850194506001830192506200167c565b509695505050505050565b604081526000620016c56040830185620015d0565b8281036020840152620016d9818562001644565b95945050505050565b600080600060408486031215620016f857600080fd5b6200170384620013f8565b9250602084013567ffffffffffffffff808211156200172157600080fd5b818601915086601f8301126200173657600080fd5b8135818111156200174657600080fd5b8760208285010111156200175957600080fd5b6020830194508093505050509250925092565b6001600160a01b038316815260406020820152600062001130604083018462001644565b6000808335601e19843603018112620017a857600080fd5b83018035915067ffffffffffffffff821115620017c457600080fd5b6020019150600581901b3603821315620017dd57600080fd5b9250929050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156200180d57600080fd5b6200107e82620013f8565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156200184157600080fd5b5051919050565b6040805190810167ffffffffffffffff811182821017156200186e576200186e62001818565b60405290565b604051610120810167ffffffffffffffff811182821017156200186e576200186e62001818565b604051601f8201601f1916810167ffffffffffffffff81118282101715620018c757620018c762001818565b604052919050565b600067ffffffffffffffff821115620018ec57620018ec62001818565b5060051b60200190565b600082601f8301126200190857600080fd5b81356020620019216200191b83620018cf565b6200189b565b82815260059290921b840181019181810190868411156200194157600080fd5b8286015b84811015620016a5576200195981620013f8565b835291830191830162001945565b80358015158114620011d657600080fd5b803563ffffffff81168114620011d657600080fd5b803567ffffffffffffffff81168114620011d657600080fd5b600082601f830112620019b857600080fd5b813567ffffffffffffffff811115620019d557620019d562001818565b620019ea601f8201601f19166020016200189b565b81815284602083860101111562001a0057600080fd5b816020850160208301376000918101602001919091529392505050565b60006060828403121562001a3057600080fd5b6040516060810167ffffffffffffffff828210818311171562001a575762001a5762001818565b8160405282935062001a6985620013f8565b8352602085013591508082111562001a8057600080fd5b62001a8e86838701620019a6565b6020840152604085013591508082111562001aa857600080fd5b5062001ab785828601620019a6565b6040830152505092915050565b60006040828403121562001ad757600080fd5b62001ae162001848565b9050813567ffffffffffffffff8082111562001afc57600080fd5b62001b0a85838601620018f6565b835260209150818401358181111562001b2257600080fd5b84019050601f8101851362001b3657600080fd5b803562001b476200191b82620018cf565b81815260059190911b8201830190838101908783111562001b6757600080fd5b928401925b8284101562001b875783358252928401929084019062001b6c565b8085870152505050505092915050565b6000806000806080858703121562001bae57600080fd5b843567ffffffffffffffff8082111562001bc757600080fd5b62001bd588838901620018f6565b9550602087013591508082111562001bec57600080fd5b90860190610120828903121562001c0257600080fd5b62001c0c62001874565b62001c178362001967565b815262001c276020840162001531565b602082015262001c3a6040840162001978565b604082015262001c4d6060840162001978565b606082015262001c60608084016200198d565b608082015262001c7360a084016200198d565b60a082015262001c8660c08401620013f8565b60c082015260e083013560e0820152610100808401358381111562001caa57600080fd5b62001cb88b828701620019a6565b82840152505080955050604087013591508082111562001cd757600080fd5b62001ce58883890162001a1d565b9350606087013591508082111562001cfc57600080fd5b5062001d0b8782880162001ac4565b91505092959194509250565b6001600160a01b03851681526000602060808184015262001d3c6080840187620015d0565b838103604085015262001d508187620015d0565b9050838103606085015284516040825262001d6f6040830182620015fe565b8684015183820393850193909352825180825290840192840191506000905b8082101562001db0578251845292840192918401916001919091019062001d8e565b50919998505050505050505050565b6001600160a01b038416815260606020820152600062001de36060830185620015fe565b8281036040840152835115158152610120602085015162001e0a602084018261ffff169052565b50604085015162001e23604084018263ffffffff169052565b50606085015162001e3c606084018263ffffffff169052565b50608085015162001e59608084018267ffffffffffffffff169052565b5060a085015162001e7660a084018267ffffffffffffffff169052565b5060c085015162001e9260c08401826001600160a01b03169052565b5060e085015160e083015261010080860151828285015262001eb783850182620015d0565b9998505050505050505050565b6000825162001ed8818460208701620015aa565b9190910192915050565b60006001820162001f0357634e487b7160e01b600052601160045260246000fd5b5060010190565b6001600160a01b0383168152604060208201526000620011306040830184620015d056fe60806040526040516106fe3803806106fe83398101604081905261002291610319565b61002e82826000610035565b5050610436565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106d7602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103e7565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b81526004016101489190610403565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b50506000910152565b6000806040838503121561032c57600080fd5b82516001600160a01b038116811461034357600080fd5b60208401519092506001600160401b038082111561036057600080fd5b818501915085601f83011261037457600080fd5b815181811115610386576103866102df565b604051601f8201601f19908116603f011681019083821181831017156103ae576103ae6102df565b816040528281528860208487010111156103c757600080fd5b6103d88360208301602088016102f5565b80955050505050509250929050565b600082516103f98184602087016102f5565b9190910192915050565b60208152600082518060208401526104228160408501602087016102f5565b601f01601f19169190910160400192915050565b610292806104456000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025f602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061020f565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f919061022b565b60005b838110156102065781810151838201526020016101ee565b50506000910152565b600082516102218184602087016101eb565b9190910192915050565b602081526000825180602084015261024a8160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e7565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051615c166200011f60003960008181610b8601528181610c0b01528181610cfe01528181610d830152610e690152615c166000f3fe6080604052600436106101c25760003560e01c80636a6b2d86116100f7578063c7f758a811610095578063e2c801b611610064578063e2c801b61461051c578063e91ddf2f14610550578063f794062e14610584578063fc5084a5146105a457600080fd5b8063c7f758a814610481578063c9c4bfca146104b4578063d0fa5a32146104e8578063da35c6641461050757600080fd5b806386f0e4ed116100d157806386f0e4ed146103ff57806398c74ade14610421578063a727afa314610441578063b1bb8d261461046157600080fd5b80636a6b2d861461039f5780636b95da93146103bf5780638696552b146103df57600080fd5b80632925e59c1161016457806341de68301161013e57806341de6830146103465780634f1ef2861461036257806352d1902d146103755780635c60da1b1461038a57600080fd5b80632925e59c146102c15780633659cfe6146102f45780634162169f1461031457600080fd5b80630f525a26116101a05780630f525a261461023e57806318f9dcf01461025e5780632078d4371461028c57806327f1608d146102ac57600080fd5b806301ffc9a7146101c75780630d0d0bcd146101fc5780630d61b5191461021e575b600080fd5b3480156101d357600080fd5b506101e76101e2366004614b8c565b6105c4565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b5061021c610217366004614bd4565b61060a565b005b34801561022a57600080fd5b5061021c610239366004614c04565b610618565b34801561024a57600080fd5b5061021c610259366004614cf3565b610634565b34801561026a57600080fd5b5061027e610279366004614f98565b61063e565b6040519081526020016101f3565b34801561029857600080fd5b5061021c6102a73660046150da565b610b14565b3480156102b857600080fd5b5061027e610b61565b3480156102cd57600080fd5b50610191546001600160401b03165b6040516001600160401b0390911681526020016101f3565b34801561030057600080fd5b5061021c61030f36600461511b565b610b7c565b34801561032057600080fd5b5060fb546001600160a01b03165b6040516001600160a01b0390911681526020016101f3565b34801561035257600080fd5b5060006040516101f39190615138565b61021c610370366004615160565b610cf4565b34801561038157600080fd5b5061027e610e5c565b34801561039657600080fd5b5061032e610f22565b3480156103ab57600080fd5b5061027e6103ba366004614c04565b610f5a565b3480156103cb57600080fd5b506101e76103da3660046151af565b610f68565b3480156103eb57600080fd5b5061021c6103fa3660046150da565b6112bf565b34801561040b57600080fd5b50610414611302565b6040516101f39190615224565b34801561042d57600080fd5b506101e761043c36600461511b565b61147a565b34801561044d57600080fd5b5061021c61045c3660046153ca565b611485565b34801561046d57600080fd5b506101e761047c366004615439565b6115bd565b34801561048d57600080fd5b506104a161049c366004614c04565b6115ea565b6040516101f397969594939291906155cb565b3480156104c057600080fd5b5061027e7f821b6e3a557148015a918c89e5d092e878a69854a2d1a410635f771bd5a8a3f581565b3480156104f457600080fd5b506101c3546001600160401b03166102dc565b34801561051357600080fd5b5061027e6119a6565b34801561052857600080fd5b5061027e7f466d2da9531a54b43e3d2bf44c5531ee51046862cbec6aecc512537816c35efe81565b34801561055c57600080fd5b5061027e7f014d0f6d145f1740f93075f6c5cea6ecd05f8fc5bd2afca7138cadea84c5d3d781565b34801561059057600080fd5b506101e761059f36600461511b565b6119b1565b3480156105b057600080fd5b5061021c6105bf366004615670565b6119e6565b60006001600160e01b0319821663bfde735360e01b14806105f557506001600160e01b0319821663079f727960e11b145b80610604575061060482611a28565b92915050565b6106148282611a68565b5050565b610620612346565b610628612387565b610631816123c6565b50565b6106148282612a94565b6000610648612346565b610650612387565b60408051610120810182526101c5805460ff81161515835261010080820461ffff1660208501526301000000820463ffffffff9081169585019590955267010000000000000082049094166060840152600160581b81046001600160401b039081166080850152600160981b9091041660a08301526101c6546001600160a01b031660c08301526101c75460e08301526101c88054600094840191906106f5906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610721906156a4565b801561076e5780601f106107435761010080835404028352916020019161076e565b820191906000526020600020905b81548152906001019060200180831161075157829003601f168201915b505050505081525050905060006107823390565b8251909150801561079957506107978161318e565b155b156107c757604051637ea66a3960e11b81526001600160a01b03821660048201526024015b60405180910390fd5b60e0820151156108935760006107dc82613199565b60c08401516040516370a0823160e01b81526001600160a01b038581166004830152929350600092909116906370a0823190602401602060405180830381865afa15801561082e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085291906156de565b90508360e001518210801561086a57508360e0015181105b15610890578360e0015160405163240f1c8160e21b81526004016107be91815260200190565b50505b6108aa856020015186604001518760600151613269565b6001600160401b039081166060890152908116604088015216602086015260808501516000036108f5578460800151604051635b2ab01360e11b81526004016107be91815260200190565b60006108ff6133f1565b60008181526101c46020908152604091829020600181018c905590890151600382018054938b015160608c01517fffffffffffffffff00000000000000000000000000000000ffffffffffffffff909516600160401b6001600160401b03948516027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1617600160801b918416919091021777ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b9290941691909102929092179091556080880151600482015560a08801519192509060058201906109e1908261573d565b5060c087015160068201556109f54361340b565b60038201805467ffffffffffffffff19166001600160401b03929092169190911790556002810188905560005b8651811015610aae5781600901878281518110610a4157610a416157fc565b602090810291909101810151825460018082018555600094855293839020825160039092020180546001600160a01b0319166001600160a01b03909216919091178155918101519282019290925560408201516002820190610aa3908261573d565b505050600101610a22565b50826001600160a01b031689837f784842613a953948c527397436300b06839500577a2fe1e958cefafddc9f394f8a602001518b604001518c606001518c8f604051610afe959493929190615812565b60405180910390a450925050505b949350505050565b60fb547f014d0f6d145f1740f93075f6c5cea6ecd05f8fc5bd2afca7138cadea84c5d3d790610b52906001600160a01b031630335b8460003661348e565b610b5c838361354a565b505050565b6000610b6e61016061363f565b6001600160e01b0316905090565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c095760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016107be565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c647f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610ccf5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016107be565b610cd881613687565b60408051600080825260208201909252610631918391906136c0565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610d815760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016107be565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ddc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610e475760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016107be565b610e5082613687565b610614828260016136c0565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610efc5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016107be565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b90565b6000610f557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b600061060461016083613860565b60008281526101c460209081526040808320815160e08082018452825460ff1615158252600183015482860152600283015482850152835190810184526003830180546001600160401b038082168452600160401b8204811697840197909752600160801b8104871695830195909552600160c01b909404909416606085810191909152600483015460808601526005830180546112b896939592860193929160a0840191611016906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906156a4565b801561108f5780601f106110645761010080835404028352916020019161108f565b820191906000526020600020905b81548152906001019060200180831161107257829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b828210156111375760008481526020908190208301805460408051828502810185019091528181529283018282801561112357602002820191906000526020600020905b81548152602001906001019080831161110f575b5050505050815260200190600101906110cb565b5050505081526020016008820180548060200260200160405190810160405280929190818152602001828054801561119857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161117a575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b828210156112aa576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101549383019390935260028301805492939291840191611219906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054611245906156a4565b80156112925780601f1061126757610100808354040283529160200191611292565b820191906000526020600020905b81548152906001019060200180831161127557829003601f168201915b505050505081525050815260200190600101906111c6565b505050508152505083613913565b9392505050565b60fb547f014d0f6d145f1740f93075f6c5cea6ecd05f8fc5bd2afca7138cadea84c5d3d7906112f8906001600160a01b03163033610b49565b610b5c838361397a565b604080516101208101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e082019290925261010081019190915260408051610120810182526101c5805460ff81161515835261010080820461ffff1660208501526301000000820463ffffffff9081169585019590955267010000000000000082049094166060840152600160581b81046001600160401b039081166080850152600160981b9091041660a08301526101c6546001600160a01b031660c08301526101c75460e08301526101c8805492939192918401916113f3906156a4565b80601f016020809104026020016040519081016040528092919081815260200182805461141f906156a4565b801561146c5780601f106114415761010080835404028352916020019161146c565b820191906000526020600020905b81548152906001019060200180831161144f57829003601f168201915b505050505081525050905090565b60006106048261318e565b600054610100900460ff16158080156114a55750600054600160ff909116105b806114bf5750303b1580156114bf575060005460ff166001145b6115315760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107be565b6000805460ff191660011790558015611554576000805461ff0019166101001790555b61155d85613a44565b611567848461397a565b61157082613ab8565b80156115b6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b038216600090815261015f602052604081206115e09083613860565b6001149392505050565b6040805160e08101825260008082526020820181905291810182905260608181018390526080820183905260a0820181905260c0820183905290829060008581526101c460209081526040808320815160e08082018452825460ff1615158252600183015482860152600283015482850152835190810184526003830180546001600160401b038082168452600160401b8204811697840197909752600160801b8104871695830195909552600160c01b90940490941660608581019190915260048301546080860152600583018054919586958895938588019360a08401916116d3906156a4565b80601f01602080910402602001604051908101604052809291908181526020018280546116ff906156a4565b801561174c5780601f106117215761010080835404028352916020019161174c565b820191906000526020600020905b81548152906001019060200180831161172f57829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b828210156117f4576000848152602090819020830180546040805182850281018501909152818152928301828280156117e057602002820191906000526020600020905b8154815260200190600101908083116117cc575b505050505081526020019060010190611788565b5050505081526020016008820180548060200260200160405190810160405280929190818152602001828054801561185557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611837575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015611967576000848152602090819020604080516060810182526003860290920180546001600160a01b03168352600181015493830193909352600283018054929392918401916118d6906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054611902906156a4565b801561194f5780601f106119245761010080835404028352916020019161194f565b820191906000526020600020905b81548152906001019060200180831161193257829003601f168201915b50505050508152505081526020019060010190611883565b50505091525050805160a0820151602083015160608401516040850151608086015160c090960151949f939e50919c509a509850919650945092505050565b6000610f5560335490565b6001600160a01b038116600090815261015f602052604081206119d39061363f565b6001600160e01b03166001149050919050565b60fb547f466d2da9531a54b43e3d2bf44c5531ee51046862cbec6aecc512537816c35efe90611a1f906001600160a01b03163033610b49565b61061482613ab8565b60006001600160e01b03198216637c99f4cd60e01b1480611a5957506001600160e01b03198216630bb5c60360e01b145b80610604575061060482613e9a565b611a70612346565b611a78612387565b33611a828161318e565b611aaa57604051637ea66a3960e11b81526001600160a01b03821660048201526024016107be565b60008381526101c4602052604081206007810154909103611ae35780600701604051630e3d24e160e31b81526004016107be9190615858565b6040805160e08082018352835460ff16151582526001840154602080840191909152600285015483850152835191820184526003850180546001600160401b038082168552600160401b8204811693850193909352600160801b8104831695840195909552600160c01b9094041660608281019190915260048501546080830152600585018054611e1a9587949386019392909160a084019190611b86906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054611bb2906156a4565b8015611bff5780601f10611bd457610100808354040283529160200191611bff565b820191906000526020600020905b815481529060010190602001808311611be257829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b82821015611ca757600084815260209081902083018054604080518285028101850190915281815292830182828015611c9357602002820191906000526020600020905b815481526020019060010190808311611c7f575b505050505081526020019060010190611c3b565b50505050815260200160088201805480602002602001604051908101604052809291908181526020018280548015611d0857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611cea575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b828210156112aa576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101549383019390935260028301805492939291840191611d89906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054611db5906156a4565b8015611e025780601f10611dd757610100808354040283529160200191611e02565b820191906000526020600020905b815481529060010190602001808311611de557829003601f168201915b50505050508152505081526020019060010190611d36565b15611e4357604051633f4fdb5960e11b81526001600160a01b03831660048201526024016107be565b6101c554600882015461010090910461ffff1611611e8f5760088101546101c554604051631906bddf60e01b81526004810192909252610100900461ffff1660248201526044016107be565b6101915460038201546001600160401b03918216911610156122d457604080516000808252602082019092526008830154909190815b81811015612293576000856008018281548110611ee457611ee46157fc565b6000918252602090912001546001600160a01b03169050611f048161318e565b801561225057506040805160e08082018352885460ff1615158252600189015460208084019190915260028a0154838501528351918201845260038a0180546001600160401b038082168552600160401b8204811693850193909352600160801b8104831695840195909552600160c01b9094041660608281019190915260048a0154608083015260058a018054612250958c949386019392909160a084019190611fae906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054611fda906156a4565b80156120275780601f10611ffc57610100808354040283529160200191612027565b820191906000526020600020905b81548152906001019060200180831161200a57829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b828210156120cf576000848152602090819020830180546040805182850281018501909152818152928301828280156120bb57602002820191906000526020600020905b8154815260200190600101908083116120a7575b505050505081526020019060010190612063565b5050505081526020016008820180548060200260200160405190810160405280929190818152602001828054801561213057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612112575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015612242576000848152602090819020604080516060810182526003860290920180546001600160a01b03168352600181015493830193909352600283018054929392918401916121b1906156a4565b80601f01602080910402602001604051908101604052809291908181526020018280546121dd906156a4565b801561222a5780601f106121ff5761010080835404028352916020019161222a565b820191906000526020600020905b81548152906001019060200180831161220d57829003601f168201915b5050505050815250508152602001906001019061215e565b505050508152505082613913565b1561228a5780858560ff168151811061226b5761226b6157fc565b6001600160a01b03909216602092830291909101909101526001909301925b50600101611ec5565b5082516122a99060088601906020860190614a47565b50506101915460038401805467ffffffffffffffff19166001600160401b0390921691909117905550505b6008810180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038516908117909155604051909186917fbf7dc1f4fd16c6ebda24e12c87e844c6ed685370ba1db171486350a7d57ae7659190a3821561234057612340846123c6565b50505050565b610191546001600160401b034381169116036123855761019154604051631b1cad2160e21b81526001600160401b0390911660048201526024016107be565b565b6101c3546001600160401b03438116911603612385576101c354604051635f7f727960e01b81526001600160401b0390911660048201526024016107be565b60008181526101c460209081526040808320815160e08082018452825460ff1615158252600183015482860152600283015482850152835190810184526003830180546001600160401b038082168452600160401b8204811697840197909752600160801b8104871695830195909552600160c01b9094049094166060858101919091526004830154608086015260058301805492959394918601939260a084019190612472906156a4565b80601f016020809104026020016040519081016040528092919081815260200182805461249e906156a4565b80156124eb5780601f106124c0576101008083540402835291602001916124eb565b820191906000526020600020905b8154815290600101906020018083116124ce57829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b828210156125935760008481526020908190208301805460408051828502810185019091528181529283018282801561257f57602002820191906000526020600020905b81548152602001906001019080831161256b575b505050505081526020019060010190612527565b505050508152602001600882018054806020026020016040519081016040528092919081815260200182805480156125f457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116125d6575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015612706576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101549383019390935260028301805492939291840191612675906156a4565b80601f01602080910402602001604051908101604052809291908181526020018280546126a1906156a4565b80156126ee5780601f106126c3576101008083540402835291602001916126ee565b820191906000526020600020905b8154815290600101906020018083116126d157829003601f168201915b50505050508152505081526020019060010190612622565b5050509152505080519091501561273357604051632776407360e11b8152600481018390526024016107be565b80608001515160000361275f578060800151604051630e3d24e160e31b81526004016107be91906158e6565b428160600151606001516001600160401b031610156127b95760608082015160408082015191909201519151624b94ed60e01b81526001600160401b039182166004820152911660248201524260448201526064016107be565b6101c55460a08201515161010090910461ffff16111561281d576101c560000160019054906101000a900461ffff166127f68260a0015151613eda565b60405163b5d6b86760e01b815261ffff9283166004820152911660248201526044016107be565b60008160800151600081518110612836576128366157fc565b6020026020010151600281518110612850576128506157fc565b6020026020010151826080015160008151811061286f5761286f6157fc565b6020026020010151600181518110612889576128896157fc565b602002602001015183608001516000815181106128a8576128a86157fc565b60200260200101516000815181106128c2576128c26157fc565b60200260200101516128d4919061590f565b6128de919061590f565b6060830151608001516101c55491925060009161290891906301000000900463ffffffff16613f54565b90508181111561293557604051630e56c8f360e11b815260048101839052602481018290526044016107be565b6000836080015160008151811061294e5761294e6157fc565b6020026020010151600081518110612968576129686157fc565b60209081029190910101516101c55461299590670100000000000000900463ffffffff16620f4240615922565b61299f9190615935565b9050600084608001516000815181106129ba576129ba6157fc565b60200260200101516001815181106129d4576129d46157fc565b60209081029190910101516101c5546129fe9190670100000000000000900463ffffffff16615935565b9050808211612a4b57612a148560800151613fcb565b6101c554604051631f68fd8160e31b81526004810192909252670100000000000000900463ffffffff1660248201526044016107be565b60008681526101c460205260409020805460ff19166001179055612a8a612a7a60fb546001600160a01b031690565b878760c00151886040015161408e565b5050505050505050565b612a9c612346565b612aa4612387565b33612aae8161318e565b612ad657604051637ea66a3960e11b81526001600160a01b03821660048201526024016107be565b60008381526101c460205260409020805460ff1615612b0b57604051632776407360e11b8152600481018590526024016107be565b6040805160e08082018352835460ff16151582526001840154602080840191909152600285015483850152835191820184526003850180546001600160401b038082168552600160401b8204811693850193909352600160801b8104831695840195909552600160c01b9094041660608281019190915260048501546080830152600585018054612e4f9587949386019392909160a084019190612bae906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054612bda906156a4565b8015612c275780601f10612bfc57610100808354040283529160200191612c27565b820191906000526020600020905b815481529060010190602001808311612c0a57829003601f168201915b50505050508152602001600382015481525050815260200160078201805480602002602001604051908101604052809291908181526020016000905b82821015612ccf57600084815260209081902083018054604080518285028101850190915281815292830182828015612cbb57602002820191906000526020600020905b815481526020019060010190808311612ca7575b505050505081526020019060010190612c63565b50505050815260200160088201805480602002602001604051908101604052809291908181526020018280548015612d3057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612d12575b5050505050815260200160098201805480602002602001604051908101604052809291908181526020016000905b82821015612e42576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101549383019390935260028301805492939291840191612db1906156a4565b80601f0160208091040260200160405190810160405280929190818152602001828054612ddd906156a4565b8015612e2a5780601f10612dff57610100808354040283529160200191612e2a565b820191906000526020600020905b815481529060010190602001808311612e0d57829003601f168201915b50505050508152505081526020019060010190612d5e565b5050505081525050614144565b612e98576003810154604051624b94ed60e01b81526001600160401b03600160801b830481166004830152600160c01b90920490911660248201524260448201526064016107be565b82516001141580612ec5575082600081518110612eb757612eb76157fc565b602002602001015151600314155b15612ee55782604051630e3d24e160e31b81526004016107be91906158e6565b6007810154156130d2576101c554600882015461010090910461ffff1611612f3b5760088101546101c554604051631906bddf60e01b81526004810192909252610100900461ffff1660248201526044016107be565b80600701600081548110612f5157612f516157fc565b90600052602060002001600081548110612f6d57612f6d6157fc565b906000526020600020015483600081518110612f8b57612f8b6157fc565b6020026020010151600081518110612fa557612fa56157fc565b6020026020010151148015613029575080600701600081548110612fcb57612fcb6157fc565b90600052602060002001600181548110612fe757612fe76157fc565b906000526020600020015483600081518110613005576130056157fc565b602002602001015160018151811061301f5761301f6157fc565b6020026020010151145b80156130a4575080600701600081548110613046576130466157fc565b90600052602060002001600281548110613062576130626157fc565b906000526020600020015483600081518110613080576130806157fc565b602002602001015160028151811061309a5761309a6157fc565b6020026020010151145b156130c45782604051630e3d24e160e31b81526004016107be91906158e6565b6130d2600882016000614aa8565b82516130e79060078301906020860190614ac6565b50600881018054600181018255600091825260209091200180546001600160a01b0319166001600160a01b03841617905560405184907fb0441bed37ecf9efe628cbd58a2cff7c1289f751684f259fde3968a92f23107b9061314a9086906158e6565b60405180910390a26040516001600160a01b0383169085907fbf7dc1f4fd16c6ebda24e12c87e844c6ed685370ba1db171486350a7d57ae76590600090a350505050565b6000610604826119b1565b6101c6546040516001600160a01b038381166024830152600092839283929091169060440160408051601f198184030181529181526020820180516001600160e01b03166309ab24eb60e41b179052516131f3919061594c565b600060405180830381855afa9150503d806000811461322e576040519150601f19603f3d011682016040523d82523d6000602084013e613233565b606091505b5091509150818015613246575080516020145b1561325f5780806020019051810190610b0c91906156de565b5060009392505050565b6000806000806132784261340b565b9050866001600160401b0316600003613293578093506132dc565b869350806001600160401b0316846001600160401b031610156132dc576040516335477cb960e11b81526001600160401b038083166004830152851660248201526044016107be565b6101c5546000906132fd90600160581b90046001600160401b031686615968565b9050866001600160401b031660000361331857809350613361565b869350806001600160401b0316846001600160401b031610156133615760405163229736a160e01b81526001600160401b038083166004830152851660248201526044016107be565b6101c55460009061338290600160981b90046001600160401b031686615968565b9050866001600160401b031660000361339d578093506133e5565b869350806001600160401b0316846001600160401b031610156133e55760405162e0e64960e71b81526001600160401b038083166004830152851660248201526044016107be565b50505093509350939050565b60006133fb6119a6565b9050610f1f603380546001019055565b60006001600160401b0382111561348a5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201527f342062697473000000000000000000000000000000000000000000000000000060648201526084016107be565b5090565b604051637ef7c88360e11b81526001600160a01b0387169063fdef9106906134c29088908890889088908890600401615988565b602060405180830381865afa1580156134df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061350391906159dc565b61354257604051630cb6f8ed60e21b81526001600160a01b038088166004830152808716602483015285166044820152606481018490526084016107be565b505050505050565b613552612346565b60008190036135775760405163148007c560e31b8152600481018290526024016107be565b600081613582610b61565b61358c9190615922565b6101c55490915061ffff610100909104811690821610156135d9576101c5546040516317b10ead60e11b815261ffff808416600483015261010090920490911660248201526044016107be565b6135e383836141c9565b610191805467ffffffffffffffff1916436001600160401b03161790556040517ff19a206b69ff20c612548bba639decadefe80ed2e7bf1a6fdc18dcde91e06e099061363290859085906159f9565b60405180910390a1505050565b8054600090801561367e5761366783613659600184615922565b600091825260209091200190565b5464010000000090046001600160e01b03166112b8565b60009392505050565b60fb547f821b6e3a557148015a918c89e5d092e878a69854a2d1a410635f771bd5a8a3f590610614906001600160a01b03163033610b49565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156136f357610b5c836142b8565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561374d575060408051601f3d908101601f1916820190925261374a918101906156de565b60015b6137bf5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016107be565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146138545760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c6555554944000000000000000000000000000000000000000000000060648201526084016107be565b50610b5c838383614376565b60004382106138b15760405162461bcd60e51b815260206004820181905260248201527f436865636b706f696e74733a20626c6f636b206e6f7420796574206d696e656460448201526064016107be565b60006138bc8361439b565b845490915060006138cf86848385614417565b905080156138fd576138e686613659600184615922565b5464010000000090046001600160e01b0316613900565b60005b6001600160e01b03169695505050505050565b60a082015151600090815b8181101561396f57836001600160a01b03168560a001518281518110613946576139466157fc565b60200260200101516001600160a01b03160361396757600192505050610604565b60010161391e565b506000949350505050565b613982612346565b60008190036139a75760405163148007c560e31b8152600481018290526024016107be565b6000816139b2610b61565b6139bc919061590f565b905061ffff8111156139eb5760405162496b8d60e61b815261ffff6004820152602481018290526044016107be565b6139f58383614475565b610191805467ffffffffffffffff1916436001600160401b03161790556040517f16fc0d8d129e5d736ba1c955c298986a94cb8475c77b7184fa6cda49be4bafe59061363290859085906159f9565b600054610100900460ff16613aaf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016107be565b610631816144e2565b613ac0612387565b613ace6001620f4240615922565b816060015163ffffffff161115613b1a57613aed6001620f4240615922565b606082015160405163cc80c19560e01b8152600481019290925263ffffffff1660248201526044016107be565b620f4240816040015163ffffffff161115613b5f57604080820151905163cc80c19560e01b8152620f4240600482015263ffffffff90911660248201526044016107be565b6301e1338081608001516001600160401b03161115613bac576080810151604051632b6ba48f60e21b81526301e1338060048201526001600160401b0390911660248201526044016107be565b61012c81608001516001600160401b03161015613bf5576080810151604051632b6ba48f60e21b8152610e1060048201526001600160401b0390911660248201526044016107be565b6301e133808160a001516001600160401b03161115613c425760a0810151604051630ba3bbab60e41b81526301e1338060048201526001600160401b0390911660248201526044016107be565b61012c8160a001516001600160401b03161015613c8b5760a0810151604051630ba3bbab60e41b8152610e1060048201526001600160401b0390911660248201526044016107be565b80516101c58054602084015160408501516060860151608087015160a088015162ffffff1990951696151562ffff0019169690961761010061ffff9094168402176affffffffffffffff0000001916630100000063ffffffff938416026affffffff000000000000001916176701000000000000009290911691909102177fffffffffff00000000000000000000000000000000ffffffffffffffffffffff16600160581b6001600160401b03958616027fffffffffff0000000000000000ffffffffffffffffffffffffffffffffffffff1617600160981b949092169390930217815560c08301516101c680546001600160a01b0319166001600160a01b0390921691909117905560e08301516101c755908201518291906101c890613db2908261573d565b50506101c3805467ffffffffffffffff1916436001600160401b031617905550610100810151604051613de5919061594c565b60405180910390208160c001516001600160a01b0316826020015161ffff167f823fd5f3f4ef81d34c23b76dc23575af42c26dbd47f3d42bb4bba0a8246d230b84600001518560400151866060015187608001518860a001518960e00151604051613e8f96959493929190951515865263ffffffff94851660208701529290931660408501526001600160401b03908116606085015291909116608083015260a082015260c00190565b60405180910390a450565b60006001600160e01b0319821663041de68360e41b1480613ecb57506001600160e01b031982166352d1902d60e01b145b80610604575061060482614556565b600061ffff82111561348a5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f362062697473000000000000000000000000000000000000000000000000000060648201526084016107be565b6000620f4240821115613f865760405163cc80c19560e01b8152620f42406004820152602481018390526044016107be565b613f908284615935565b92506000613fa1620f424085615a52565b9050613fb0620f424085615a66565b91508015613fc457613fc182615a7a565b91505b5092915050565b600081600081518110613fe057613fe06157fc565b6020026020010151600181518110613ffa57613ffa6157fc565b602002602001015182600081518110614015576140156157fc565b602002602001015160008151811061402f5761402f6157fc565b6020026020010151614041919061590f565b620f424083600081518110614058576140586157fc565b6020026020010151600081518110614072576140726157fc565b60200260200101516140849190615935565b6106049190615a66565b6040516331c6fcc960e21b81526060906000906001600160a01b0387169063c71bf324906140c490889088908890600401615a93565b6000604051808303816000875af11580156140e3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261410b9190810190615abc565b604051919350915085907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a294509492505050565b600080429050806001600160401b03168360600151602001516001600160401b03161080156141965750614179600182615baf565b6001600160401b03168360600151604001516001600160401b0316105b80156141bb5750806001600160401b03168360600151606001516001600160401b0316115b1561367e5750600192915050565b60005b818110156142a8576141fe8383838181106141e9576141e96157fc565b905060200201602081019061059f919061511b565b61424e57828282818110614214576142146157fc565b9050602002016020810190614229919061511b565b60405163c0b7477d60e01b81526001600160a01b0390911660048201526024016107be565b61429e600061015f600086868681811061426a5761426a6157fc565b905060200201602081019061427f919061511b565b6001600160a01b0316815260208101919091526040016000209061458b565b50506001016141cc565b506123406101606145c1836145c6565b6001600160a01b0381163b6143355760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016107be565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b61437f836145fe565b60008251118061438c5750805b15610b5c57612340838361463e565b600063ffffffff82111561348a5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201527f322062697473000000000000000000000000000000000000000000000000000060648201526084016107be565b60005b8183101561446d57600061442e8484614663565b60008781526020902090915063ffffffff86169082015463ffffffff16111561445957809250614467565b61446481600161590f565b93505b5061441a565b509392505050565b60005b818110156144d2576144958383838181106141e9576141e96157fc565b156144ac57828282818110614214576142146157fc565b6144c8600161015f600086868681811061426a5761426a6157fc565b5050600101614478565b5061234061016061467e836145c6565b600054610100900460ff1661454d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016107be565b61063181614682565b60006001600160e01b0319821663368d719960e21b148061060457506301ffc9a760e01b6001600160e01b0319831614610604565b6000806145a98461459b4361439b565b6145a48661470f565b61478e565b6001600160e01b0391821693501690505b9250929050565b900390565b6000806145f1856145ec6145d98861363f565b6001600160e01b0316868863ffffffff16565b61458b565b915091505b935093915050565b614607816142b8565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606112b88383604051806060016040528060278152602001615be360279139614931565b60006146726002848418615a66565b6112b89084841661590f565b0190565b600054610100900460ff166146ed5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016107be565b60fb80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0382111561348a5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203260448201527f323420626974730000000000000000000000000000000000000000000000000060648201526084016107be565b8254600090819080156148d75760006147ac87613659600185615922565b60408051808201909152905463ffffffff8082168084526401000000009092046001600160e01b03166020840152919250908716101561482e5760405162461bcd60e51b815260206004820152601b60248201527f436865636b706f696e743a2064656372656173696e67206b657973000000000060448201526064016107be565b805163ffffffff808816911603614877578461484f88613659600186615922565b80546001600160e01b03929092166401000000000263ffffffff9092169190911790556148c7565b6040805180820190915263ffffffff80881682526001600160e01b0380881660208085019182528b54600181018d5560008d81529190912094519151909216640100000000029216919091179101555b6020015192508391506145f69050565b50506040805180820190915263ffffffff80851682526001600160e01b0380851660208085019182528854600181018a5560008a8152918220955192519093166401000000000291909316179201919091559050816145f6565b6060600080856001600160a01b03168560405161494e919061594c565b600060405180830381855af49150503d8060008114614989576040519150601f19603f3d011682016040523d82523d6000602084013e61498e565b606091505b509150915061499f868383876149a9565b9695505050505050565b60608315614a18578251600003614a11576001600160a01b0385163b614a115760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107be565b5081610b0c565b610b0c8383815115614a2d5781518083602001fd5b8060405162461bcd60e51b81526004016107be9190615bcf565b828054828255906000526020600020908101928215614a9c579160200282015b82811115614a9c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614a67565b5061348a929150614b1f565b50805460008255906000526020600020908101906106319190614b1f565b828054828255906000526020600020908101928215614b13579160200282015b82811115614b135782518051614b03918491602090910190614b34565b5091602001919060010190614ae6565b5061348a929150614b6f565b5b8082111561348a5760008155600101614b20565b828054828255906000526020600020908101928215614a9c579160200282015b82811115614a9c578251825591602001919060010190614b54565b8082111561348a576000614b838282614aa8565b50600101614b6f565b600060208284031215614b9e57600080fd5b81356001600160e01b0319811681146112b857600080fd5b801515811461063157600080fd5b8035614bcf81614bb6565b919050565b60008060408385031215614be757600080fd5b823591506020830135614bf981614bb6565b809150509250929050565b600060208284031215614c1657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614c5557614c55614c1d565b60405290565b60405160e081016001600160401b0381118282101715614c5557614c55614c1d565b60405161012081016001600160401b0381118282101715614c5557614c55614c1d565b604051601f8201601f191681016001600160401b0381118282101715614cc857614cc8614c1d565b604052919050565b60006001600160401b03821115614ce957614ce9614c1d565b5060051b60200190565b6000806040808486031215614d0757600080fd5b833592506020808501356001600160401b0380821115614d2657600080fd5b818701915087601f830112614d3a57600080fd5b8135614d4d614d4882614cd0565b614ca0565b81815260059190911b8301840190848101908a831115614d6c57600080fd5b8585015b83811015614df857803585811115614d885760008081fd5b8601603f81018d13614d9a5760008081fd5b87810135614daa614d4882614cd0565b81815260059190911b82018a0190898101908f831115614dca5760008081fd5b928b01925b82841015614de85783358252928a0192908a0190614dcf565b8652505050918601918601614d70565b50809750505050505050509250929050565b80356001600160401b0381168114614bcf57600080fd5b60006001600160401b03821115614e3a57614e3a614c1d565b50601f01601f191660200190565b600082601f830112614e5957600080fd5b8135614e67614d4882614e21565b818152846020838601011115614e7c57600080fd5b816020850160208301376000918101602001919091529392505050565b6001600160a01b038116811461063157600080fd5b8035614bcf81614e99565b600082601f830112614eca57600080fd5b81356020614eda614d4883614cd0565b82815260059290921b84018101918181019086841115614ef957600080fd5b8286015b84811015614f8d5780356001600160401b0380821115614f1d5760008081fd5b908801906060828b03601f1901811315614f375760008081fd5b614f3f614c33565b87840135614f4c81614e99565b815260408481013589830152918401359183831115614f6b5760008081fd5b614f798d8a85880101614e48565b908201528652505050918301918301614efd565b509695505050505050565b60008060008060808587031215614fae57600080fd5b843593506020850135925060408501356001600160401b0380821115614fd357600080fd5b9086019060e08289031215614fe757600080fd5b614fef614c5b565b614ff883614e0a565b815261500660208401614e0a565b602082015261501760408401614e0a565b604082015261502860608401614e0a565b60608201526080830135608082015260a08301358281111561504957600080fd5b6150558a828601614e48565b60a08301525060c083013560c082015280945050606087013591508082111561507d57600080fd5b5061508a87828801614eb9565b91505092959194509250565b60008083601f8401126150a857600080fd5b5081356001600160401b038111156150bf57600080fd5b6020830191508360208260051b85010111156145ba57600080fd5b600080602083850312156150ed57600080fd5b82356001600160401b0381111561510357600080fd5b61510f85828601615096565b90969095509350505050565b60006020828403121561512d57600080fd5b81356112b881614e99565b602081016003831061515a57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806040838503121561517357600080fd5b823561517e81614e99565b915060208301356001600160401b0381111561519957600080fd5b6151a585828601614e48565b9150509250929050565b600080604083850312156151c257600080fd5b823591506020830135614bf981614e99565b60005b838110156151ef5781810151838201526020016151d7565b50506000910152565b600081518084526152108160208601602086016151d4565b601f01601f19169290920160200192915050565b6020815261523760208201835115159052565b6000602083015161524e604084018261ffff169052565b50604083015163ffffffff8116606084015250606083015163ffffffff811660808401525060808301516001600160401b03811660a08401525060a08301516001600160401b03811660c08401525060c08301516001600160a01b03811660e08401525060e08301516101008381019190915283015161012080840152613fc16101408401826151f8565b803561ffff81168114614bcf57600080fd5b803563ffffffff81168114614bcf57600080fd5b6000610120828403121561531257600080fd5b61531a614c7d565b905061532582614bc4565b8152615333602083016152d9565b6020820152615344604083016152eb565b6040820152615355606083016152eb565b606082015261536660808301614e0a565b608082015261537760a08301614e0a565b60a082015261538860c08301614eae565b60c082015260e082013560e0820152610100808301356001600160401b038111156153b257600080fd5b6153be85828601614e48565b82840152505092915050565b600080600080606085870312156153e057600080fd5b84356153eb81614e99565b935060208501356001600160401b038082111561540757600080fd5b61541388838901615096565b9095509350604087013591508082111561542c57600080fd5b5061508a878288016152ff565b6000806040838503121561544c57600080fd5b823561545781614e99565b946020939093013593505050565b60006001600160401b03808351168452806020840151166020850152806040840151166040850152806060840151166060850152506080820151608084015260a082015160e060a08501526154bd60e08501826151f8565b60c093840151949093019390935250919050565b600081518084526020808501808196508360051b810191508286016000805b8681101561553f578385038a52825180518087529087019087870190845b8181101561552a5783518352928901929189019160010161550e565b50509a87019a955050918501916001016154f0565b509298975050505050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156155be578284038952815180516001600160a01b0316855285810151868601526040908101516060918601829052906155aa818701836151f8565b9a87019a955050509084019060010161556b565b5091979650505050505050565b600060e082018915158352602060e081850152818a5180845261010086019150828c01935060005b818110156156185784516001600160a01b0316835293830193918301916001016155f3565b50508960408601528481036060860152615632818a615465565b9250505085608084015282810360a084015261564e81866154d1565b905082810360c0840152615662818561554d565b9a9950505050505050505050565b60006020828403121561568257600080fd5b81356001600160401b0381111561569857600080fd5b613fc1848285016152ff565b600181811c908216806156b857607f821691505b6020821081036156d857634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156156f057600080fd5b5051919050565b601f821115610b5c57600081815260208120601f850160051c8101602086101561571e5750805b601f850160051c820191505b818110156135425782815560010161572a565b81516001600160401b0381111561575657615756614c1d565b61576a8161576484546156a4565b846156f7565b602080601f83116001811461579f57600084156157875750858301515b600019600386901b1c1916600185901b178555613542565b600085815260208120601f198616915b828110156157ce578886015182559484019460019091019084016157af565b50858210156157ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b038088168352808716602084015280861660408401525060a0606083015261584660a083018561554d565b90508260808301529695505050505050565b6000602080830181845280855480835260408601915060408160051b87010192506000878152848120815b838110156158d857888603603f1901855281548087528284528784208888019190855b828110156158c25781548452928a0192600191820191016158a6565b5091975050509386019360019182019101615883565b509398975050505050505050565b6020815260006112b860208301846154d1565b634e487b7160e01b600052601160045260246000fd5b80820180821115610604576106046158f9565b81810381811115610604576106046158f9565b8082028115828204841417610604576106046158f9565b6000825161595e8184602087016151d4565b9190910192915050565b6001600160401b03818116838216019080821115613fc457613fc46158f9565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000602082840312156159ee57600080fd5b81516112b881614bb6565b60208082528181018390526000908460408401835b86811015614f8d578235615a2181614e99565b6001600160a01b031682529183019190830190600101615a0e565b634e487b7160e01b600052601260045260246000fd5b600082615a6157615a61615a3c565b500690565b600082615a7557615a75615a3c565b500490565b600060018201615a8c57615a8c6158f9565b5060010190565b838152606060208201526000615aac606083018561554d565b9050826040830152949350505050565b6000806040808486031215615ad057600080fd5b83516001600160401b0380821115615ae757600080fd5b818601915086601f830112615afb57600080fd5b81516020615b0b614d4883614cd0565b82815260059290921b8401810191818101908a841115615b2a57600080fd5b8286015b84811015615b9b57805186811115615b465760008081fd5b8701603f81018d13615b585760008081fd5b84810151615b68614d4882614e21565b8181528e8b838501011115615b7d5760008081fd5b615b8c828883018d86016151d4565b85525050918301918301615b2e565b509890910151979997985050505050505050565b6001600160401b03828116828216039080821115613fc457613fc46158f9565b6020815260006112b860208301846151f856fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000875760003560e01c80639cb0a12411620000625780639cb0a1241462000120578063a8a9c29e1462000146578063e89b6b91146200016d578063f10832f1146200019557600080fd5b806301ffc9a7146200008c578063599cb1a614620000b85780635c60da1b14620000f9575b600080fd5b620000a36200009d366004620013cc565b620001bc565b60405190151581526020015b60405180910390f35b620000e07f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001620000af565b7f0000000000000000000000000000000000000000000000000000000000000000620000e0565b620001376200013136600462001429565b620001f4565b604051620000af9190620014e4565b6200015d6200015736600462001544565b62000827565b604051620000af929190620016b0565b620000e07f000000000000000000000000000000000000000000000000000000000000000081565b620001ac620001a6366004620016e2565b6200084f565b604051620000af9291906200176c565b60006001600160e01b0319821663099718b560e41b1480620001ee57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600062000207602084018462001790565b915050600181146200023457604051633c53187f60e21b8152600481018290526024015b60405180910390fd5b600062000245602085018562001790565b6000818110620002595762000259620017e4565b9050602002016020810190620002709190620017fa565b905060006200027f8262000f8c565b9050600081600081518110620002995762000299620017e4565b60200260200101518015620002c8575081600181518110620002bf57620002bf620017e4565b60200260200101515b8015620002f0575081600281518110620002e657620002e6620017e4565b6020026020010151155b9050806200030057600462000303565b60055b60ff1667ffffffffffffffff81111562000321576200032162001818565b6040519080825280602002602001820160405280156200037c57816020015b6040805160a081018252600080825260208083018290529282018190526060820181905260808201528252600019909201910181620003405790505b506040805160a0810190915260018152909550602080820190620003a390890189620017fa565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2c801b66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200042f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200045591906200182e565b815250856000815181106200046e576200046e620017e4565b60209081029190910101526040805160a0810190915280600181526020908101906200049d90890189620017fa565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e91ddf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000529573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200054f91906200182e565b81525085600181518110620005685762000568620017e4565b60209081029190910101526040805160a0810190915280600181526020908101906200059790890189620017fa565b6001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c9c4bfca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000623573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200064991906200182e565b81525085600281518110620006625762000662620017e4565b60209081029190910101526040805160a081019091528060018152602001886001600160a01b03168152602001876000016020810190620006a49190620017fa565b6001600160a01b0316815260200160006001600160a01b03168152602001886001600160a01b0316630729d0546040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000701573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200072791906200182e565b81525085600381518110620007405762000740620017e4565b602002602001018190525080156200081d576040805160a081019091528060018152602001846001600160a01b03168152602001886001600160a01b0316815260200160006001600160a01b03168152602001846001600160a01b031663b2d2989c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620007d2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007f891906200182e565b81525085600481518110620008115762000811620017e4565b60200260200101819052505b5050505092915050565b606062000847604051806040016040528060608152602001606081525090565b935093915050565b60006200086f604051806040016040528060608152602001606081525090565b6000808080620008828789018962001b97565b8151604080516001808252818301909252959950939750919550935091600091602080830190803683370190505090506001600160a01b0382161562000932576001600160a01b0382163b620008f7576040516318aca2db60e01b81526001600160a01b03831660048201526024016200022b565b620009028262001085565b6200092c5760405163fa8925f160e01b81526001600160a01b03831660048201526024016200022b565b620009d9565b620009667f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662001138565b9150816001600160a01b031663dab27fa98c86602001518760400151876040518563ffffffff1660e01b8152600401620009a4949392919062001d17565b600060405180830381600087803b158015620009bf57600080fd5b505af1158015620009d4573d6000803e3d6000fd5b505050505b8181600081518110620009f057620009f0620017e4565b6001600160a01b039283166020918202929092010152821660c086015260405162000a7b907f00000000000000000000000000000000000000000000000000000000000000009062000a4b908e908a908a9060240162001dbf565b60408051601f198184030181529190526020810180516001600160e01b031663a727afa360e01b179052620011db565b84519098506000906001600160a01b031662000a9957600562000a9c565b60045b60ff1667ffffffffffffffff81111562000aba5762000aba62001818565b60405190808252806020026020018201604052801562000b1557816020015b6040805160a08101825260008082526020808301829052928201819052606082018190526080820152825260001990920191018162000ad95790505b506040805160a0810190915290915080600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2c801b66040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000bb9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bdf91906200182e565b8152508160008151811062000bf85762000bf8620017e4565b60209081029190910101526040805160a0810190915280600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e91ddf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000ca3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cc991906200182e565b8152508160018151811062000ce25762000ce2620017e4565b60209081029190910101526040805160a0810190915280600081526020018a6001600160a01b031681526020018d6001600160a01b0316815260200160006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c9c4bfca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000d8d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000db391906200182e565b8152508160028151811062000dcc5762000dcc620017e4565b60209081029190910101526040805160a0810190915280600081526020018d6001600160a01b031681526020018a6001600160a01b0316815260200160006001600160a01b031681526020018d6001600160a01b0316630729d0546040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000e57573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e7d91906200182e565b8152508160038151811062000e965762000e96620017e4565b602090810291909101015284516001600160a01b031662000f74576000836001600160a01b031663b2d2989c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000ef2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f1891906200182e565b6040805160a0810190915290915080600081526001600160a01b0380871660208301528f1660408201526000606082015260800182905282518390600490811062000f675762000f67620017e4565b6020026020010181905250505b90875260208701525094989397509295505050505050565b60408051600380825260808201909252606091600091906020820184803683370190505090506336372b0760e01b8160008151811062000fd05762000fd0620017e4565b60200260200101906001600160e01b03191690816001600160e01b03191681525050637487d9fb60e11b81600181518110620010105762001010620017e4565b60200260200101906001600160e01b03191690816001600160e01b0319168152505063078984cd60e11b81600281518110620010505762001050620017e4565b6001600160e01b0319909216602092830291909101909101526200107e6001600160a01b03841682620011e9565b9392505050565b604051306024820152600090819081906001600160a01b0385169060440160408051601f198184030181529181526020820180516001600160e01b03166370a0823160e01b17905251620010da919062001ec4565b600060405180830381855afa9150503d806000811462001117576040519150601f19603f3d011682016040523d82523d6000602084013e6200111c565b606091505b509150915081801562001130575080516020145b949350505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b038116620011d65760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c65640000000000000000000060448201526064016200022b565b919050565b60006200107e8383620012bf565b60606000825167ffffffffffffffff8111156200120a576200120a62001818565b60405190808252806020026020018201604052801562001234578160200160208202803683370190505b5090506200124284620012fb565b156200107e5760005b8351811015620012b7576200127d858583815181106200126f576200126f620017e4565b602002602001015162001333565b828281518110620012925762001292620017e4565b9115156020928302919091019091015280620012ae8162001ee2565b9150506200124b565b509392505050565b60008282604051620012d190620013be565b620012de92919062001f0a565b604051809103906000f080158015620012b7573d6000803e3d6000fd5b600062001310826301ffc9a760e01b62001333565b8015620001ee57506200132c826001600160e01b031962001333565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d91506000519050828015620013a6575060208210155b8015620013b35750600081115b979650505050505050565b6106fe8062001f2f83390190565b600060208284031215620013df57600080fd5b81356001600160e01b0319811681146200107e57600080fd5b80356001600160a01b0381168114620011d657600080fd5b6000606082840312156200142357600080fd5b50919050565b600080604083850312156200143d57600080fd5b6200144883620013f8565b9150602083013567ffffffffffffffff8111156200146557600080fd5b620014738582860162001410565b9150509250929050565b6000815160038110620014a057634e487b7160e01b600052602160045260246000fd5b8352506020818101516001600160a01b0390811691840191909152604080830151821690840152606080830151909116908301526080908101519082015260a00190565b6020808252825182820181905260009190848201906040850190845b818110156200152557620015168385516200147d565b93850193925060010162001500565b50909695505050505050565b803561ffff81168114620011d657600080fd5b6000806000606084860312156200155a57600080fd5b6200156584620013f8565b9250620015756020850162001531565b9150604084013567ffffffffffffffff8111156200159257600080fd5b620015a08682870162001410565b9150509250925092565b60005b83811015620015c7578181015183820152602001620015ad565b50506000910152565b60008151808452620015ea816020860160208601620015aa565b601f01601f19169290920160200192915050565b600081518084526020808501945080840160005b83811015620016395781516001600160a01b03168752958201959082019060010162001612565b509495945050505050565b60008151604084526200165b6040850182620015fe565b60208481015186830387830152805180845290820193509091600091908301905b80831015620016a557620016928286516200147d565b915083850194506001830192506200167c565b509695505050505050565b604081526000620016c56040830185620015d0565b8281036020840152620016d9818562001644565b95945050505050565b600080600060408486031215620016f857600080fd5b6200170384620013f8565b9250602084013567ffffffffffffffff808211156200172157600080fd5b818601915086601f8301126200173657600080fd5b8135818111156200174657600080fd5b8760208285010111156200175957600080fd5b6020830194508093505050509250925092565b6001600160a01b038316815260406020820152600062001130604083018462001644565b6000808335601e19843603018112620017a857600080fd5b83018035915067ffffffffffffffff821115620017c457600080fd5b6020019150600581901b3603821315620017dd57600080fd5b9250929050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156200180d57600080fd5b6200107e82620013f8565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156200184157600080fd5b5051919050565b6040805190810167ffffffffffffffff811182821017156200186e576200186e62001818565b60405290565b604051610120810167ffffffffffffffff811182821017156200186e576200186e62001818565b604051601f8201601f1916810167ffffffffffffffff81118282101715620018c757620018c762001818565b604052919050565b600067ffffffffffffffff821115620018ec57620018ec62001818565b5060051b60200190565b600082601f8301126200190857600080fd5b81356020620019216200191b83620018cf565b6200189b565b82815260059290921b840181019181810190868411156200194157600080fd5b8286015b84811015620016a5576200195981620013f8565b835291830191830162001945565b80358015158114620011d657600080fd5b803563ffffffff81168114620011d657600080fd5b803567ffffffffffffffff81168114620011d657600080fd5b600082601f830112620019b857600080fd5b813567ffffffffffffffff811115620019d557620019d562001818565b620019ea601f8201601f19166020016200189b565b81815284602083860101111562001a0057600080fd5b816020850160208301376000918101602001919091529392505050565b60006060828403121562001a3057600080fd5b6040516060810167ffffffffffffffff828210818311171562001a575762001a5762001818565b8160405282935062001a6985620013f8565b8352602085013591508082111562001a8057600080fd5b62001a8e86838701620019a6565b6020840152604085013591508082111562001aa857600080fd5b5062001ab785828601620019a6565b6040830152505092915050565b60006040828403121562001ad757600080fd5b62001ae162001848565b9050813567ffffffffffffffff8082111562001afc57600080fd5b62001b0a85838601620018f6565b835260209150818401358181111562001b2257600080fd5b84019050601f8101851362001b3657600080fd5b803562001b476200191b82620018cf565b81815260059190911b8201830190838101908783111562001b6757600080fd5b928401925b8284101562001b875783358252928401929084019062001b6c565b8085870152505050505092915050565b6000806000806080858703121562001bae57600080fd5b843567ffffffffffffffff8082111562001bc757600080fd5b62001bd588838901620018f6565b9550602087013591508082111562001bec57600080fd5b90860190610120828903121562001c0257600080fd5b62001c0c62001874565b62001c178362001967565b815262001c276020840162001531565b602082015262001c3a6040840162001978565b604082015262001c4d6060840162001978565b606082015262001c60608084016200198d565b608082015262001c7360a084016200198d565b60a082015262001c8660c08401620013f8565b60c082015260e083013560e0820152610100808401358381111562001caa57600080fd5b62001cb88b828701620019a6565b82840152505080955050604087013591508082111562001cd757600080fd5b62001ce58883890162001a1d565b9350606087013591508082111562001cfc57600080fd5b5062001d0b8782880162001ac4565b91505092959194509250565b6001600160a01b03851681526000602060808184015262001d3c6080840187620015d0565b838103604085015262001d508187620015d0565b9050838103606085015284516040825262001d6f6040830182620015fe565b8684015183820393850193909352825180825290840192840191506000905b8082101562001db0578251845292840192918401916001919091019062001d8e565b50919998505050505050505050565b6001600160a01b038416815260606020820152600062001de36060830185620015fe565b8281036040840152835115158152610120602085015162001e0a602084018261ffff169052565b50604085015162001e23604084018263ffffffff169052565b50606085015162001e3c606084018263ffffffff169052565b50608085015162001e59608084018267ffffffffffffffff169052565b5060a085015162001e7660a084018267ffffffffffffffff169052565b5060c085015162001e9260c08401826001600160a01b03169052565b5060e085015160e083015261010080860151828285015262001eb783850182620015d0565b9998505050505050505050565b6000825162001ed8818460208701620015aa565b9190910192915050565b60006001820162001f0357634e487b7160e01b600052601160045260246000fd5b5060010190565b6001600160a01b0383168152604060208201526000620011306040830184620015d056fe60806040526040516106fe3803806106fe83398101604081905261002291610319565b61002e82826000610035565b5050610436565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106d7602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103e7565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b81526004016101489190610403565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b50506000910152565b6000806040838503121561032c57600080fd5b82516001600160a01b038116811461034357600080fd5b60208401519092506001600160401b038082111561036057600080fd5b818501915085601f83011261037457600080fd5b815181811115610386576103866102df565b604051601f8201601f19908116603f011681019083821181831017156103ae576103ae6102df565b816040528281528860208487010111156103c757600080fd5b6103d88360208301602088016102f5565b80955050505050509250929050565b600082516103f98184602087016102f5565b9190910192915050565b60208152600082518060208401526104228160408501602087016102f5565b601f01601f19169190910160400192915050565b610292806104456000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025f602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061020f565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f919061022b565b60005b838110156102065781810151838201526020016101ee565b50506000910152565b600082516102218184602087016101eb565b9190910192915050565b602081526000825180602084015261024a8160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a", "devdoc": { "author": "Vocdoni", "errors": { diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index ea426fca..72cc1715 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -26,6 +26,7 @@ const apiUrls: NetworkNameMapping = { polygon: 'https://polygon-mainnet.infura.io/v3/', polygonMumbai: 'https://polygon-mumbai.infura.io/v3/', baseGoerli: 'https://goerli.base.org', + sepolia: 'https://sepolia.infura.io/v3/', }; export const networks: {[index: string]: NetworkUserConfig} = { @@ -58,6 +59,12 @@ export const networks: {[index: string]: NetworkUserConfig} = { url: `${apiUrls.baseGoerli}`, gasPrice: 20000000000, }, + sepolia: { + chainId: 11155111, + gasPrice: 100000000, + // blockGasLimit: 30000000, + url: `${apiUrls.sepolia}${process.env.INFURA_API_KEY}`, + }, }; // Uses hardhats private key if none is set. DON'T USE THIS ACCOUNT FOR DEPLOYMENTS @@ -89,6 +96,7 @@ const config: HardhatUserConfig = { goerli: process.env.ETHERSCAN_API_KEY || '', polygon: process.env.POLYGONSCAN_API_KEY || '', polygonMumbai: process.env.POLYGONSCAN_API_KEY || '', + sepolia: process.env.ETHERSCAN_API_KEY || '', baseGoerli: process.env.BASESCAN_API_KEY || '', }, customChains: [ @@ -100,6 +108,14 @@ const config: HardhatUserConfig = { browserURL: 'https://goerli.basescan.org', }, }, + { + network: 'sepolia', + chainId: 11155111, + urls: { + apiURL: 'https://api-sepolia.etherscan.io/api', + browserURL: 'https://sepolia.etherscan.io', + }, + }, ], }, diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 7c59e5c4..8853fb16 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -36,8 +36,10 @@ "tmp-promise": "^3.0.3" }, "dependencies": { - "@aragon/osx": "^1.3.0-rc0.3", - "@aragon/osx-ethers": "^1.3.0-rc0.3", + "@aragon/osx": "1.3.0", + "@aragon/osx-ethers": "1.4.0-alpha.0", + "@aragon/osx-commons-configs": "0.2.0", + "@aragon/osx-commons-contracts": "1.4.0-alpha.3", "@ensdomains/ens-contracts": "0.0.20", "@openzeppelin/contracts": "^4.8.2", "@openzeppelin/contracts-upgradeable": "^4.8.2", diff --git a/packages/contracts/plugin-info-testing.json b/packages/contracts/plugin-info-testing.json index fc8a5bfe..38b01a05 100644 --- a/packages/contracts/plugin-info-testing.json +++ b/packages/contracts/plugin-info-testing.json @@ -28,5 +28,35 @@ "releaseMetadataURI": "ipfs://QmR9r1GLfsPoET8Mya1rr6AXjwpAvrCGZJ13oMEFFTYCsE" } } + }, + "sepolia": { + "repo": "vocdoni-gasless-voting-poc-vanilla-erc20", + "address": "0xb663C36d6fd959beeF2b82Bb40823660FEAaa55f", + "args": [], + "blockNumberOfDeployment": 5288754, + "releases": { + "1": { + "builds": { + "1": { + "setup": { + "name": "VocdoniVotingSetup", + "address": "0x5A6E29875cCa6eb7a9c39938720e6096468a8917", + "args": [], + "blockNumberOfDeployment": 5288947 + }, + "implementation": { + "name": "VocdoniVoting", + "address": "0xa28A89Dcf2A94a751FE094C794624cB101EB460a", + "args": [], + "blockNumberOfDeployment": 5288947 + }, + "helpers": [], + "buildMetadataURI": "ipfs://QmSH3MLwaKV4SH4r4RdrqFQUoSjk97H2Z4VjMewXvu7yLT", + "blockNumberOfPublication": 5288969 + } + }, + "releaseMetadataURI": "ipfs://QmcuUcHeFcQe4LhLyXBkLCxU61Asy6nYi1WRYZ6C4Ui42V" + } + } } } diff --git a/packages/contracts/plugin-info.json b/packages/contracts/plugin-info.json index 8129af81..30598ba0 100644 --- a/packages/contracts/plugin-info.json +++ b/packages/contracts/plugin-info.json @@ -1,28 +1,45 @@ { "goerli": { - "repo": "vocdoni-gasless-voting-poc", - "address": "0x74057f3F3809a874f28E3EbE80A1f1a5a137b64E", + "repo": "vocdoni-gasless-voting-poc-vanilla-erc20", + "address": "0x98C60A356f03244f9C33C9cA224d960cD45FD2C1", "args": [], - "blockNumberOfDeployment": 10008529, + "blockNumberOfDeployment": 10451417, "releases": { "1": { "builds": { "1": { "setup": { "name": "VocdoniVotingSetup", - "address": "0xf8454f52f3ecA6c1a9E5Da0119173832F208ab18", + "address": "0x4EeFE283C193AA561E0C3B4977171305C2C2Dd01", "args": [], - "blockNumberOfDeployment": 10008531 + "blockNumberOfDeployment": 10451418 }, "implementation": { "name": "VocdoniVoting", - "address": "0x46f31156Ff2557EA7C1E592bdB3Ad81CfCCE297c", + "address": "0x3193b4C1E3dBE4b650ACB493476D2A3894133649", "args": [], - "blockNumberOfDeployment": 10008531 + "blockNumberOfDeployment": 10451418 }, "helpers": [], "buildMetadataURI": "ipfs://QmSH3MLwaKV4SH4r4RdrqFQUoSjk97H2Z4VjMewXvu7yLT", - "blockNumberOfPublication": 10008533 + "blockNumberOfPublication": 10451419 + }, + "2": { + "setup": { + "name": "VocdoniVotingSetup", + "address": "0x6847B82F943D7a761F12878b93a25868408D6cc3", + "args": [], + "blockNumberOfDeployment": 10452517 + }, + "implementation": { + "name": "VocdoniVoting", + "address": "0x39f85f184611A9A1D8e6bE042e4Fa9eE984F230b", + "args": [], + "blockNumberOfDeployment": 10452517 + }, + "helpers": [], + "buildMetadataURI": "ipfs://QmSH3MLwaKV4SH4r4RdrqFQUoSjk97H2Z4VjMewXvu7yLT", + "blockNumberOfPublication": 10452518 } }, "releaseMetadataURI": "ipfs://QmcuUcHeFcQe4LhLyXBkLCxU61Asy6nYi1WRYZ6C4Ui42V" diff --git a/packages/contracts/plugin-settings.ts b/packages/contracts/plugin-settings.ts index bd6f2056..dcffa595 100644 --- a/packages/contracts/plugin-settings.ts +++ b/packages/contracts/plugin-settings.ts @@ -1,7 +1,7 @@ import buildMetadata from './src/build-metadata.json'; import releaseMetadata from './src/release-metadata.json'; -export const PLUGIN_REPO_ENS_NAME = 'vocdoni-gasless-voting-poc'; +export const PLUGIN_REPO_ENS_NAME = 'vocdoni-gasless-voting-poc-vanilla-erc20'; export const PLUGIN_CONTRACT_NAME = 'VocdoniVoting'; export const PLUGIN_SETUP_CONTRACT_NAME = 'VocdoniVotingSetup'; diff --git a/packages/contracts/src/ExecutionMultisig.sol b/packages/contracts/src/ExecutionMultisig.sol new file mode 100644 index 00000000..e0e1d793 --- /dev/null +++ b/packages/contracts/src/ExecutionMultisig.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later +pragma solidity 0.8.17; + +import {ERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {SafeCastUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; + +import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; +import {PluginUUPSUpgradeable} from "@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol"; +import {Addresslist} from "@aragon/osx/plugins/utils/Addresslist.sol"; + +import {IExecutionMultisig} from "./IExecutionMultisig.sol"; + +abstract contract ExecutionMultisig is + IExecutionMultisig, + Initializable, + ERC165Upgradeable, + PluginUUPSUpgradeable, + Addresslist +{ + using SafeCastUpgradeable for uint256; + + /// @notice The ID of the permission required to add/remove executionMultisig members. + bytes32 public constant UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID = + keccak256("UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION"); + + /// @notice Keeps track at which block number the executionMultisig has been changed the last time. + uint64 internal lastExecutionMultisigChange; + + /// @notice Initializes the component to be used by inheriting contracts. + /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822). + /// @param _dao The IDAO interface of the associated DAO. + function __ExecutionMultisig_init(IDAO _dao) internal onlyInitializing { + __PluginUUPSUpgradeable_init(_dao); + } + + /// @notice Checks if this or the parent contract supports an interface by its ID. + /// @param _interfaceId The ID of the interface. + /// @return Returns `true` if the interface is supported. + function supportsInterface( + bytes4 _interfaceId + ) public view virtual override(ERC165Upgradeable, PluginUUPSUpgradeable) returns (bool) { + return + _interfaceId == type(IExecutionMultisig).interfaceId || + _interfaceId == type(Addresslist).interfaceId || + super.supportsInterface(_interfaceId); + } + + /// @inheritdoc IExecutionMultisig + function addExecutionMultisigMembers( + address[] calldata _members + ) external override auth(UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID) { + _addExecutionMultisigMembers(_members); + } + + /// @notice Private function for adding execution multisig members. + /// @param _members The addresses to add. + function _addExecutionMultisigMembers(address[] calldata _members) internal { + _guardExecutionMultisig(); + if (_members.length == 0) { + revert InvalidListLength({length: _members.length}); + } + + uint256 newAddresslistLength = addresslistLength() + _members.length; + + // Check if the new address list length would be greater than `type(uint16).max`, the maximal number of approvals. + if (newAddresslistLength > type(uint16).max) { + revert AddresslistLengthOutOfBounds({ + limit: type(uint16).max, + actual: newAddresslistLength + }); + } + + _addAddresses(_members); + lastExecutionMultisigChange = uint64(block.number); + + emit ExecutionMultisigMembersAdded({newMembers: _members}); + } + + /// @inheritdoc IExecutionMultisig + function removeExecutionMultisigMembers(address[] calldata _members) external virtual {} + + /// @inheritdoc IExecutionMultisig + function isExecutionMultisigMember(address _member) public view override returns (bool) { + return _isExecutionMultisigMember(_member); + } + + /// @notice Internal function for checking whether an address is a executionMultisig member. + /// @param _member The address to check. + /// @return Whether the address is a executionMultisig member. + function _isExecutionMultisigMember(address _member) internal view returns (bool) { + return isListed(_member); + } + + /// @notice Returns true if msg.sender has approved the given proposal tally + /// @param _proposalId The ID of the proposal. + /// @return Whether the msg.sender has approved the proposal tally. + function hasApprovedTally( + uint256 _proposalId, + address _member + ) external view virtual returns (bool); + + /// @notice Returns the block number of the last executionMultisig change. + /// @return The block number of the last executionMultisig change. + function getLastExecutionMultisigChange() external view returns (uint64) { + return lastExecutionMultisigChange; + } + + /// @notice Guard checks that processes key updates are not executed in the same block + /// where the executionMultisig changed. + function _guardExecutionMultisig() internal view { + if (lastExecutionMultisigChange == uint64(block.number)) { + revert ExecutionMultisigUpdatedTooRecently({lastUpdate: lastExecutionMultisigChange}); + } + } + + /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)). + uint256[49] private __gap; +} diff --git a/packages/contracts/src/IExecutionMultisig.sol b/packages/contracts/src/IExecutionMultisig.sol new file mode 100644 index 00000000..7faf14dc --- /dev/null +++ b/packages/contracts/src/IExecutionMultisig.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later +pragma solidity 0.8.17; + +interface IExecutionMultisig { + /// @notice Emitted when one or more execution multisig members are added. + /// @param newMembers The addresses of the new execution multisig members. + event ExecutionMultisigMembersAdded(address[] newMembers); + + /// @notice Emitted when one or more execution multisig member are removed. + /// @param removedMembers The addresses of the removed execution multisig members. + event ExecutionMultisigMembersRemoved(address[] removedMembers); + + /// @notice Thrown if the address list length is out of bounds. + /// @param limit The limit value. + /// @param actual The actual value. + error AddresslistLengthOutOfBounds(uint16 limit, uint256 actual); + + /// @notice Thrown if invalid list length + /// @param length The actual length + error InvalidListLength(uint256 length); + + /// @notice Thrown if the minimal approvals value is out of bounds (less than 1 or greater than the number of members in the address list). + /// @param limit The maximal value. + /// @param actual The actual value. + error MinApprovalsOutOfBounds(uint16 limit, uint16 actual); + + /// @notice Thrown if the execution multisig is updated too recently. + /// @param lastUpdate The block number of the last update. + error ExecutionMultisigUpdatedTooRecently(uint64 lastUpdate); + + /// @notice Adds members to the execution multisig. + /// @param _members The addresses to add. + function addExecutionMultisigMembers(address[] calldata _members) external; + + /// @notice Removes members from the execution multisig. + /// @param _members The addresses to remove. + function removeExecutionMultisigMembers(address[] calldata _members) external; + + /// @notice Checks if an address is a member of the execution multisig. + /// @param _member The address to check. + /// @return Whether the address is a member of the execution multisig. + function isExecutionMultisigMember(address _member) external view returns (bool); + + /// @notice Returns true if msg.sender has approved the given proposal tally + /// @param _proposalId The ID of the proposal. + /// @return Whether the msg.sender has approved the proposal tally. + function hasApprovedTally(uint256 _proposalId, address _member) external view returns (bool); + + /// @notice Returns the block number of the last executionMultisig change. + /// @return The block number of the last executionMultisig change. + function getLastExecutionMultisigChange() external view returns (uint64); +} diff --git a/packages/contracts/src/IVocdoniProposal.sol b/packages/contracts/src/IVocdoniProposal.sol index b981525d..b496aab7 100644 --- a/packages/contracts/src/IVocdoniProposal.sol +++ b/packages/contracts/src/IVocdoniProposal.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity ^0.8.17; +pragma solidity 0.8.17; import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; diff --git a/packages/contracts/src/IVocdoniVoting.sol b/packages/contracts/src/IVocdoniVoting.sol index 2c0dedc4..23a5f6e4 100644 --- a/packages/contracts/src/IVocdoniVoting.sol +++ b/packages/contracts/src/IVocdoniVoting.sol @@ -1,19 +1,11 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity ^0.8.17; +pragma solidity 0.8.17; /// @title IVocdoniVoting /// @author Vocdoni /// @notice The Vocdoni gasless voting contract interface for the OSX plugin. /// @notice The voting Proposal is managed gasless on the Vocdoni blockchain. interface IVocdoniVoting { - /// @notice Emitted when one or more execution multisig members are added. - /// @param newMembers The addresses of the new execution multisig members. - event ExecutionMultisigMembersAdded(address[] newMembers); - - /// @notice Emitted when one or more execution multisig member are removed. - /// @param removedMembers The addresses of the removed execution multisig members. - event ExecutionMultisigMembersRemoved(address[] removedMembers); - /// @notice Emitted when the tally of a proposal is set. /// @param proposalId The ID of the proposal. /// @param tally The tally. @@ -23,16 +15,6 @@ interface IVocdoniVoting { /// @param proposalId The ID of the proposal. event TallyApproval(uint256 indexed proposalId, address indexed approver); - /// @notice Thrown if the address list length is out of bounds. - /// @param limit The limit value. - /// @param actual The actual value. - error AddresslistLengthOutOfBounds(uint16 limit, uint256 actual); - - /// @notice Thrown if the minimal approvals value is out of bounds (less than 1 or greater than the number of members in the address list). - /// @param limit The maximal value. - /// @param actual The actual value. - error MinApprovalsOutOfBounds(uint16 limit, uint16 actual); - /// @notice Thrown if the vote phase duration is out of bounds (more than 1 year or less than 1 hour). /// @param limit The limit value. /// @param actual The actual value. @@ -62,10 +44,6 @@ interface IVocdoniVoting { /// @param lastUpdate The block number of the last update. error PluginSettingsUpdatedTooRecently(uint64 lastUpdate); - /// @notice Thrown if the execution multisig is updated too recently. - /// @param lastUpdate The block number of the last update. - error ExecutionMultisigUpdatedTooRecently(uint64 lastUpdate); - /// @notice Thrown if the proposal is already executed. /// @param proposalId The ID of the proposal. error ProposalAlreadyExecuted(uint256 proposalId); @@ -124,23 +102,6 @@ interface IVocdoniVoting { /// @param totalVotingPower The total voting power error InvalidTotalVotingPower(uint256 totalVotingPower); - /// @notice Thrown if invalid list length - /// @param length The actual length - error InvalidListLength(uint256 length); - - /// @notice Adds new execution multisig members. - /// @param _members The addresses of the new execution multisig members. - function addExecutionMultisigMembers(address[] calldata _members) external; - - /// @notice Removes execution multisig members. - /// @param _members The addresses of the execution multisig members to remove. - function removeExecutionMultisigMembers(address[] calldata _members) external; - - /// @notice Returns whether an address is a execution ultisig member. - /// @param _member The address to check. - /// @return Whether the address is a execution multisig member. - function isExecutionMultisigMember(address _member) external view returns (bool); - /// @notice Sets the tally of a given proposal. /// @param _proposalId The ID of the proposal to set the tally of. /// @param _tally The tally to set. diff --git a/packages/contracts/src/VocdoniProposalUpgradeable.sol b/packages/contracts/src/VocdoniProposalUpgradeable.sol index 40391b5d..915b5d25 100644 --- a/packages/contracts/src/VocdoniProposalUpgradeable.sol +++ b/packages/contracts/src/VocdoniProposalUpgradeable.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity ^0.8.17; +pragma solidity 0.8.17; import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import {ERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; @@ -13,6 +13,44 @@ import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; abstract contract VocdoniProposalUpgradeable is IVocdoniProposal, ERC165Upgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; + /// @notice A container for the proposal parameters. + /// @param securityBlock Block number used for limiting contract usage when plugin settings are updated + /// @param startDate The timestamp when the proposal starts. + /// @param voteEndDate The timestamp when the proposal ends. At this point the tally can be set. + /// @param tallyEndDate The timestamp when the proposal expires. Proposal can't be executed after. + /// @param totalVotingPower The total voting power of the proposal. + /// @param censusURI The URI of the census. + /// @param censusRoot The root of the census. + struct ProposalParameters { + uint64 securityBlock; + uint64 startDate; + uint64 voteEndDate; + uint64 tallyEndDate; + uint256 totalVotingPower; + string censusURI; + bytes32 censusRoot; + } + + /// @notice A container for proposal-related information. + /// @param executed Whether the proposal is executed or not. + /// @param vochainProposalId The ID of the proposal in the Vochain. + /// @param allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1, + // the proposal succeeds even if the nth action reverts. A failure map value of 0 requires every action to not revert. + /// @param parameters The parameters of the proposal. + /// @param tally The tally of the proposal. + /// @dev tally only supports [[Yes, No, Abstain]] schema in this order. i.e [[10, 5, 2]] means 10 Yes, 5 No, 2 Abstain. + /// @param approvers The approvers of the tally. + /// @param actions The actions to be executed when the proposal passes. + struct Proposal { + bool executed; + bytes32 vochainProposalId; + uint256 allowFailureMap; + ProposalParameters parameters; + uint256[][] tally; + address[] approvers; + IDAO.Action[] actions; + } + /// @notice The incremental ID for proposals and executions. CountersUpgradeable.Counter private proposalCounter; diff --git a/packages/contracts/src/VocdoniVoting.sol b/packages/contracts/src/VocdoniVoting.sol index 37826f20..3666ab52 100644 --- a/packages/contracts/src/VocdoniVoting.sol +++ b/packages/contracts/src/VocdoniVoting.sol @@ -1,28 +1,22 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity ^0.8.17; +pragma solidity 0.8.17; import {SafeCastUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; import {IVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol"; import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; -import {PluginUUPSUpgradeable} from "@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol"; import {RATIO_BASE, _applyRatioCeiled, RatioOutOfBounds} from "@aragon/osx/plugins/utils/Ratio.sol"; -import {Addresslist} from "@aragon/osx/plugins/utils/Addresslist.sol"; import {VocdoniProposalUpgradeable} from "./VocdoniProposalUpgradeable.sol"; import {IVocdoniVoting} from "./IVocdoniVoting.sol"; +import {ExecutionMultisig} from "./ExecutionMultisig.sol"; /// @title VocdoniVoting /// @author Vocdoni /// @notice The Vocdoni gasless voting data contract for the OSX plugin. /// @notice The voting Proposal is managed gasless on the Vocdoni blockchain. -contract VocdoniVoting is - IVocdoniVoting, - PluginUUPSUpgradeable, - VocdoniProposalUpgradeable, - Addresslist -{ +contract VocdoniVoting is IVocdoniVoting, VocdoniProposalUpgradeable, ExecutionMultisig { using SafeCastUpgradeable for uint256; /// @notice The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID of the contract. @@ -33,10 +27,6 @@ contract VocdoniVoting is bytes32 public constant UPDATE_PLUGIN_SETTINGS_PERMISSION_ID = keccak256("UPDATE_PLUGIN_SETTINGS_PERMISSION"); - /// @notice The ID of the permission required to add/remove executionMultisig members. - bytes32 public constant UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID = - keccak256("UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION"); - /// @notice Emitted when the plugin settings are updated. /// @param onlyExecutionMultisigProposalCreation If true, only executionMultisig members can create proposals. /// @param minTallyApprovals The minimum number of approvals required for a tally to be considered accepted. @@ -81,50 +71,9 @@ contract VocdoniVoting is string censusStrategyURI; } - /// @notice A container for the proposal parameters. - /// @param securityBlock Block number used for limiting contract usage when plugin settings are updated - /// @param startDate The timestamp when the proposal starts. - /// @param voteEndDate The timestamp when the proposal ends. At this point the tally can be set. - /// @param tallyEndDate The timestamp when the proposal expires. Proposal can't be executed after. - /// @param totalVotingPower The total voting power of the proposal. - /// @param censusURI The URI of the census. - /// @param censusRoot The root of the census. - struct ProposalParameters { - uint64 securityBlock; - uint64 startDate; - uint64 voteEndDate; - uint64 tallyEndDate; - uint256 totalVotingPower; - string censusURI; - bytes32 censusRoot; - } - - /// @notice A container for proposal-related information. - /// @param executed Whether the proposal is executed or not. - /// @param vochainProposalId The ID of the proposal in the Vochain. - /// @param allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1, - // the proposal succeeds even if the nth action reverts. A failure map value of 0 requires every action to not revert. - /// @param parameters The parameters of the proposal. - /// @param tally The tally of the proposal. - /// @dev tally only supports [[Yes, No, Abstain]] schema in this order. i.e [[10, 5, 2]] means 10 Yes, 5 No, 2 Abstain. - /// @param approvers The approvers of the tally. - /// @param actions The actions to be executed when the proposal passes. - struct Proposal { - bool executed; - bytes32 vochainProposalId; - uint256 allowFailureMap; - ProposalParameters parameters; - uint256[][] tally; - address[] approvers; - IDAO.Action[] actions; - } - /// @notice Keeps track at which block number the plugin settings have been changed the last time. uint64 private lastPluginSettingsChange; - /// @notice Keeps track at which block number the executionMultisig has been changed the last time. - uint64 private lastExecutionMultisigChange; - /// @notice A mapping between proposal IDs and proposal information. mapping(uint256 => Proposal) private proposals; @@ -140,7 +89,7 @@ contract VocdoniVoting is address[] calldata _executionMultisigAddresses, PluginSettings memory _pluginSettings ) external initializer { - __PluginUUPSUpgradeable_init(_dao); + __ExecutionMultisig_init(_dao); _addExecutionMultisigMembers(_executionMultisigAddresses); _updatePluginSettings(_pluginSettings); } @@ -150,52 +99,15 @@ contract VocdoniVoting is /// @return Returns `true` if the interface is supported. function supportsInterface( bytes4 _interfaceId - ) - public - view - virtual - override(PluginUUPSUpgradeable, VocdoniProposalUpgradeable) - returns (bool) - { + ) public view virtual override(ExecutionMultisig, VocdoniProposalUpgradeable) returns (bool) { return _interfaceId == VOCDONI_INTERFACE_ID || _interfaceId == type(IVocdoniVoting).interfaceId || - _interfaceId == type(Addresslist).interfaceId || super.supportsInterface(_interfaceId); } - /// @inheritdoc IVocdoniVoting - function addExecutionMultisigMembers( - address[] calldata _members - ) external override auth(UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID) { - _addExecutionMultisigMembers(_members); - } - - /// @notice Private function for adding execution multisig members. - /// @param _members The addresses to add. - function _addExecutionMultisigMembers(address[] calldata _members) private { - _guardExecutionMultisig(); - if (_members.length == 0) { - revert InvalidListLength({length: _members.length}); - } - - uint256 newAddresslistLength = addresslistLength() + _members.length; - - // Check if the new address list length would be greater than `type(uint16).max`, the maximal number of approvals. - if (newAddresslistLength > type(uint16).max) { - revert AddresslistLengthOutOfBounds({ - limit: type(uint16).max, - actual: newAddresslistLength - }); - } - - _addAddresses(_members); - lastExecutionMultisigChange = uint64(block.number); - - emit ExecutionMultisigMembersAdded({newMembers: _members}); - } - - /// @inheritdoc IVocdoniVoting + /// @inheritdoc ExecutionMultisig + /// @dev Overriden where for having access to minTallyApprovals function removeExecutionMultisigMembers( address[] calldata _members ) external override auth(UPDATE_PLUGIN_EXECUTION_MULTISIG_PERMISSION_ID) { @@ -226,16 +138,32 @@ contract VocdoniVoting is emit ExecutionMultisigMembersRemoved({removedMembers: _members}); } - /// @inheritdoc IVocdoniVoting - function isExecutionMultisigMember(address _member) public view override returns (bool) { - return _isExecutionMultisigMember(_member); + /// @inheritdoc ExecutionMultisig + function hasApprovedTally( + uint256 _proposalId, + address _member + ) external view override returns (bool) { + return _hasApprovedTally(proposals[_proposalId], _member); } - /// @notice Internal function for checking whether an address is a executionMultisig member. - /// @param _member The address to check. - /// @return Whether the address is a executionMultisig member. - function _isExecutionMultisigMember(address _member) internal view returns (bool) { - return isListed(_member); + /// @notice Internal function for checking if a member has approved a proposal tally. + /// @param _proposal The proposal to check. + /// @param _member The member to check. + /// @return Whether the member has approved the proposal tally. + function _hasApprovedTally( + Proposal memory _proposal, + address _member + ) internal pure returns (bool) { + uint approversLength = _proposal.approvers.length; + for (uint256 i = 0; i < approversLength; ) { + if (_proposal.approvers[i] == _member) { + return true; + } + unchecked { + i++; + } + } + return false; } /// @notice Updates the plugin settings. @@ -258,6 +186,7 @@ contract VocdoniVoting is actual: _pluginSettings.supportThreshold }); } + // Require the minimum participation value to be in the interval [0, 10^6], because `>=` comparision is used in the participation criterion. if (_pluginSettings.minParticipation > RATIO_BASE) { revert RatioOutOfBounds({limit: RATIO_BASE, actual: _pluginSettings.minParticipation}); @@ -370,7 +299,8 @@ contract VocdoniVoting is if (_pluginSettings.minProposerVotingPower != 0) { // Because of the checks in `VocdoniVotingSetup`, we can assume that `votingToken` is an [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token. - uint256 votes = IVotesUpgradeable(_pluginSettings.daoTokenAddress).getVotes(sender); + // It can be the case where the token does not implement the getVotes() function, so we need to handle the call as a possible failure to ignore. + uint256 votes = _tryGetVotes(sender); uint256 balance = IERC20Upgradeable(_pluginSettings.daoTokenAddress).balanceOf(sender); if ( @@ -407,6 +337,7 @@ contract VocdoniVoting is proposal.parameters.censusRoot = _parameters.censusRoot; proposal.parameters.securityBlock = block.number.toUint64(); proposal.allowFailureMap = _allowFailureMap; + for (uint256 i = 0; i < _actions.length; ) { proposal.actions.push(_actions[i]); unchecked { @@ -534,7 +465,8 @@ contract VocdoniVoting is address[] memory newApprovers = new address[](0); // newApprovers are the oldApprovers list without the non executionMultisig members at the current block uint8 newApproversCount = 0; - for (uint256 i = 0; i < proposal.approvers.length; ) { + uint approversLength = proposal.approvers.length; + for (uint256 i = 0; i < approversLength; ) { address oldApprover = proposal.approvers[i]; if ( _isExecutionMultisigMember(oldApprover) && @@ -586,8 +518,14 @@ contract VocdoniVoting is return false; } - /// @notice Internal function to check the tally and execute a proposal if the tally - /// number of YES votes is greater than the tally number of NO votes. + /// @notice Internal function to check the tally and execute a proposal if: + /// - The support threshold is reached + /// - The minimum participation is reached. + /// - Enough execution multisig members have approved the tally. + /// - Proposal is not already executed. + /// - The tally is valid. + /// - The proposal is in the tally phase. + /// @param _proposalId The ID of the proposal to check. function _checkTallyAndExecute(uint256 _proposalId) internal { Proposal memory proposal = proposals[_proposalId]; @@ -666,7 +604,7 @@ contract VocdoniVoting is uint64 _startDate, uint64 _voteEndDate, uint64 _tallyEndDate - ) internal view virtual returns (uint64 startDate, uint64 voteEndDate, uint64 tallyEndDate) { + ) internal view returns (uint64 startDate, uint64 voteEndDate, uint64 tallyEndDate) { uint64 currentBlockTimestamp = block.timestamp.toUint64(); // check proposal start date and set it to the current block timestamp if it is 0 if (_startDate == 0) { @@ -708,40 +646,6 @@ contract VocdoniVoting is return pluginSettings; } - /// @notice Returns true if the provided _member has approved the given proposal tally - /// @param _proposalId The ID of the proposal. - /// @return Whether the msg.sender has approved the proposal tally. - function hasApprovedTally(uint256 _proposalId, address _member) external view returns (bool) { - return _hasApprovedTally(proposals[_proposalId], _member); - } - - /// @notice Internal function for checking if a member has approved a proposal tally. - /// @param _proposal The proposal to check. - /// @param _member The member to check. - /// @return Whether the member has approved the proposal tally. - function _hasApprovedTally( - Proposal memory _proposal, - address _member - ) internal pure returns (bool) { - for (uint256 i = 0; i < _proposal.approvers.length; ) { - if (_proposal.approvers[i] == _member) { - return true; - } - unchecked { - i++; - } - } - return false; - } - - /// @notice Guard checks that processes key updates are not executed in the same block - /// where the executionMultisig changed. - function _guardExecutionMultisig() internal view { - if (lastExecutionMultisigChange == uint64(block.number)) { - revert ExecutionMultisigUpdatedTooRecently({lastUpdate: lastExecutionMultisigChange}); - } - } - /// @notice Guard checks that processes key updates are not executed in the same block /// where the plugin settings changed. function _guardPluginSettings() internal view { @@ -750,13 +654,25 @@ contract VocdoniVoting is } } - // get last executionMultisig change block number - function getLastExecutionMultisigChange() external view returns (uint64) { - return lastExecutionMultisigChange; - } - - // get last plugin settings change block number + /// @notice Returns the last block number where the plugin settings changed. + /// @return The last block number where the plugin settings changed. function getLastPluginSettingsChange() external view returns (uint64) { return lastPluginSettingsChange; } + + /// @notice Handles the getVotes() call possible failure. + /// @param voter The address of the user. + /// @return uint256 The votes of the user. + function _tryGetVotes(address voter) internal view returns (uint256) { + (bool success, bytes memory data) = pluginSettings.daoTokenAddress.staticcall( + abi.encodeCall(IVotesUpgradeable.getVotes, voter) + ); + if (success && data.length == 32) { + // Decode and return the votes if the call was successful and data length is correct + return abi.decode(data, (uint256)); + } else { + // If the call failed or returned unexpected data, handle as error + return 0; + } + } } diff --git a/packages/contracts/src/VocdoniVotingSetup.sol b/packages/contracts/src/VocdoniVotingSetup.sol index 1c28994c..36435125 100644 --- a/packages/contracts/src/VocdoniVotingSetup.sol +++ b/packages/contracts/src/VocdoniVotingSetup.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity ^0.8.17; +pragma solidity 0.8.17; import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; import {DAO} from "@aragon/osx/core/dao/DAO.sol"; @@ -101,29 +101,6 @@ contract VocdoniVotingSetup is PluginSetup { if (!_isERC20(token)) { revert TokenNotERC20(token); } - - // [0] = IERC20Upgradeable, [1] = IVotesUpgradeable, [2] = IGovernanceWrappedERC20 - bool[] memory supportedIds = _getTokenInterfaceIds(token); - - if ( - // If token supports none of them - // it's simply ERC20 which gets checked by _isERC20 - // Currently, not a satisfiable check. - (!supportedIds[0] && !supportedIds[1] && !supportedIds[2]) || - // If token supports IERC20, but neither - // IVotes nor IGovernanceWrappedERC20, it needs wrapping. - (supportedIds[0] && !supportedIds[1] && !supportedIds[2]) - ) { - token = governanceWrappedERC20Base.clone(); - // User already has a token. We need to wrap it in - // GovernanceWrappedERC20 in order to make the token - // include governance functionality. - GovernanceWrappedERC20(token).initialize( - IERC20Upgradeable(tokenSettings.addr), - tokenSettings.name, - tokenSettings.symbol - ); - } } else { // Clone a `GovernanceERC20`. token = governanceERC20Base.clone(); @@ -136,6 +113,7 @@ contract VocdoniVotingSetup is PluginSetup { } helpers[0] = token; + pluginSettings.daoTokenAddress = token; // Prepare and Deploy the plugin proxy. diff --git a/packages/contracts/src/dependencies/dependencies.sol b/packages/contracts/src/dependencies/dependencies.sol index 1d5770b4..12983396 100644 --- a/packages/contracts/src/dependencies/dependencies.sol +++ b/packages/contracts/src/dependencies/dependencies.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity ^0.8.17; +pragma solidity 0.8.17; import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; import {DAO} from "@aragon/osx/core/dao/DAO.sol"; @@ -21,30 +21,3 @@ import {ENSSubdomainRegistrar} from "@aragon/osx/framework/utils/ens/ENSSubdomai import {ENSRegistry} from "@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol"; import {FIFSRegistrar} from "@ensdomains/ens-contracts/contracts/registry/FIFSRegistrar.sol"; import {PublicResolver} from "@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol"; - -contract GovernanceERC20Mock is GovernanceERC20 { - constructor( - IDAO _dao, - string memory _name, - string memory _symbol, - MintSettings memory _mintSettings - ) - GovernanceERC20( - _dao, - _name, - _symbol, - _mintSettings //MintSettings({amounts: new uint256[](0), receivers: new address[](0)}) - ) - {} - - // sets the balance of the address - // this mints/burns the amount depending on the current balance - function setBalance(address to, uint256 amount) public { - uint256 old = balanceOf(to); - if (old < amount) { - _mint(to, amount - old); - } else if (old > amount) { - _burn(to, old - amount); - } - } -} diff --git a/packages/contracts/src/test/TestContrats.sol b/packages/contracts/src/test/TestContrats.sol new file mode 100644 index 00000000..78c13dd8 --- /dev/null +++ b/packages/contracts/src/test/TestContrats.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later +pragma solidity 0.8.17; + +import {GovernanceERC20} from "@aragon/osx/token/ERC20/governance/GovernanceERC20.sol"; +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; + + +contract GovernanceERC20Mock is GovernanceERC20 { + constructor( + IDAO _dao, + string memory _name, + string memory _symbol, + MintSettings memory _mintSettings + ) + GovernanceERC20( + _dao, + _name, + _symbol, + _mintSettings //MintSettings({amounts: new uint256[](0), receivers: new address[](0)}) + ) + {} + + // sets the balance of the address + // this mints/burns the amount depending on the current balance + function setBalance(address to, uint256 amount) public { + uint256 old = balanceOf(to); + if (old < amount) { + _mint(to, amount - old); + } else if (old > amount) { + _burn(to, old - amount); + } + } +} + +contract ERC20BasicMock is ERC20 { + constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {} + + function mint(address to, uint256 amount) public { + _mint(to, amount); + } +} diff --git a/packages/contracts/tsconfig.json b/packages/contracts/tsconfig.json index 4d61aedd..a1c130de 100644 --- a/packages/contracts/tsconfig.json +++ b/packages/contracts/tsconfig.json @@ -16,7 +16,7 @@ "strict": true, "target": "es6" }, - "exclude": ["node_modules"], + "exclude": ["node_modules", "../../node_modules"], "files": ["./hardhat.config.ts"], "include": [ "src/**/*", diff --git a/packages/contracts/utils/helpers.ts b/packages/contracts/utils/helpers.ts index 24cc149d..ae573407 100644 --- a/packages/contracts/utils/helpers.ts +++ b/packages/contracts/utils/helpers.ts @@ -1,4 +1,8 @@ -import {activeContractsList} from '@aragon/osx-ethers'; +import { + getLatestNetworkDeployment, + getNetworkByNameOrAlias, +} from '@aragon/osx-commons-configs'; +// import {activeContractsList} from '@aragon/osx-ethers'; import {ContractFactory, ContractTransaction} from 'ethers'; import { Interface, @@ -19,7 +23,7 @@ export type ContractBlockNumberList = { [index: string]: {[index: string]: {address: string; blockNumber: number}}; }; -export const osxContracts: ContractList = activeContractsList; +// export const osxContracts: ContractList = activeContractsList; export const networkNameMapping: NetworkNameMapping = { mainnet: 'mainnet', @@ -27,6 +31,7 @@ export const networkNameMapping: NetworkNameMapping = { polygon: 'polygon', polygonMumbai: 'mumbai', baseGoerli: 'baseGoerli', + sepolia: 'sepolia', }; export const ERRORS = { @@ -44,14 +49,23 @@ export function getPluginRepoFactoryAddress(networkName: string) { ? process.env.NETWORK_NAME : 'mainnet'; - pluginRepoFactoryAddr = osxContracts[hardhatForkNetwork].PluginRepoFactory; + const network = getNetworkByNameOrAlias(hardhatForkNetwork); + if (!network) { + throw new Error(`Network "${networkName}" not found`); + } + const version = getLatestNetworkDeployment(network.name); + pluginRepoFactoryAddr = version?.PluginRepoFactory.address as string; + // pluginRepoFactoryAddr = osxContracts[hardhatForkNetwork].PluginRepoFactory; console.log( `Using the "${hardhatForkNetwork}" PluginRepoFactory address (${pluginRepoFactoryAddr}) for deployment testing on network "${networkName}"` ); } else { - pluginRepoFactoryAddr = - osxContracts[networkNameMapping[networkName]].PluginRepoFactory; - + const network = getNetworkByNameOrAlias(networkName); + if (!network) { + throw new Error(`Network "${networkName}" not found`); + } + const version = getLatestNetworkDeployment(network.name); + pluginRepoFactoryAddr = version?.PluginRepoFactory.address as string; console.log( `Using the ${networkNameMapping[networkName]} PluginRepoFactory address (${pluginRepoFactoryAddr}) for deployment...` ); @@ -59,11 +73,46 @@ export function getPluginRepoFactoryAddress(networkName: string) { return pluginRepoFactoryAddr; } +export function getTokensAddresses(networkName: string) { + let addresses: string[] = []; + if ( + networkName === 'localhost' || + networkName === 'hardhat' || + networkName === 'coverage' + ) { + const hardhatForkNetwork = process.env.NETWORK_NAME + ? process.env.NETWORK_NAME + : 'mainnet'; + + const network = getNetworkByNameOrAlias(hardhatForkNetwork); + if (!network) { + throw new Error(`Network "${networkName}" not found`); + } + const version = getLatestNetworkDeployment(network.name); + addresses = [ + version?.GovernanceERC20.address ?? '', + version?.GovernanceWrappedERC20.address ?? '', + ]; + // pluginRepoFactoryAddr = osxContracts[hardhatForkNetwork].PluginRepoFactory; + } else { + const network = getNetworkByNameOrAlias(networkName); + if (!network) { + throw new Error(`Network "${networkName}" not found`); + } + const version = getLatestNetworkDeployment(network.name); + addresses = [ + version?.GovernanceERC20.address ?? '', + version?.GovernanceWrappedERC20.address ?? '', + ]; + } + return addresses; +} + export function getPluginInfo(networkName: string): any { let pluginInfoFilePath: string; let pluginInfo: any = {}; - if (['localhost', 'hardhat', 'coverage'].includes(networkName)) { + if (['localhost', 'hardhat', 'coverage', 'sepolia'].includes(networkName)) { pluginInfoFilePath = 'plugin-info-testing.json'; } else { pluginInfoFilePath = 'plugin-info.json'; @@ -85,7 +134,7 @@ export function getPluginInfo(networkName: string): any { } function storePluginInfo(networkName: string, pluginInfo: any) { - if (['localhost', 'hardhat', 'coverage'].includes(networkName)) { + if (['localhost', 'hardhat', 'coverage', 'sepolia'].includes(networkName)) { writeFileSync( 'plugin-info-testing.json', JSON.stringify(pluginInfo, null, 2) + '\n' diff --git a/packages/js-client/package.json b/packages/js-client/package.json index f49e7244..8060812d 100644 --- a/packages/js-client/package.json +++ b/packages/js-client/package.json @@ -1,7 +1,7 @@ { "name": "@vocdoni/gasless-voting", "author": "Vocdoni Association", - "version": "0.0.1-rc17", + "version": "0.0.1-rc23", "description": "Aragon DAO Gasless Voting Plugin SDK", "license": "AGPL-3.0-or-later", "main": "dist/index.js", @@ -86,14 +86,15 @@ "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.2", "@ethersproject/wallet": "^5.7.0", - "graphql": "^16.6.0", - "graphql-request": "4.3.0", - "@vocdoni/gasless-voting-ethers": "0.0.1-rc1", - "@vocdoni/sdk": "0.7.1", + "@types/big.js": "^6.1.5", + "@vocdoni/gasless-voting-ethers": "0.0.1-rc3", + "@vocdoni/sdk": "0.7.5", "axios": "0.27.2", - "@types/big.js": "^6.1.5" + "graphql": "^16.6.0", + "graphql-request": "4.3.0" }, "jest": { + "preset": "ts-jest", "testEnvironment": "./test-environment.js", "testTimeout": 120000 } diff --git a/packages/js-client/src/internal/constants.ts b/packages/js-client/src/internal/constants.ts index 83086870..8a8e533e 100644 --- a/packages/js-client/src/internal/constants.ts +++ b/packages/js-client/src/internal/constants.ts @@ -18,7 +18,7 @@ import { VocdoniVoting__factory } from '@vocdoni/gasless-voting-ethers'; export const DEFAULT_GASLESS_VOTING_REPO_ADDRESS = '0x0000000000000000000000000000000000000000'; export const DEFAULT_GASLESS_VOTING_SUBHGRAPH_URL = - 'https://api.studio.thegraph.com/query/56700/gasless-voting/version/latest'; + 'https://api.studio.thegraph.com/query/56701/vocdoni-gasless-voting-plugin/version/latest'; export const DEFAULT_ADDRESSES: { [K in SupportedNetwork]: { repoAddress: string; setupAddress: string }; } = { @@ -27,8 +27,8 @@ export const DEFAULT_ADDRESSES: { repoAddress: '', }, goerli: { - setupAddress: '0xf8454f52f3ecA6c1a9E5Da0119173832F208ab18', - repoAddress: '0x74057f3F3809a874f28E3EbE80A1f1a5a137b64E', + setupAddress: '0x6847B82F943D7a761F12878b93a25868408D6cc3', + repoAddress: '0x98C60A356f03244f9C33C9cA224d960cD45FD2C1', }, matic: { setupAddress: '', @@ -55,8 +55,8 @@ export const DEFAULT_ADDRESSES: { repoAddress: '', }, sepolia: { - setupAddress: '', - repoAddress: '', + setupAddress: '0x5A6E29875cCa6eb7a9c39938720e6096468a8917', + repoAddress: '0xb663C36d6fd959beeF2b82Bb40823660FEAaa55f', }, arbitrum: { setupAddress: '', diff --git a/packages/js-client/src/internal/graphql-queries/member.ts b/packages/js-client/src/internal/graphql-queries/member.ts new file mode 100644 index 00000000..02013e39 --- /dev/null +++ b/packages/js-client/src/internal/graphql-queries/member.ts @@ -0,0 +1,23 @@ +import { gql } from 'graphql-request'; + +export const QueryMemberInfo = gql` + query PluginMembers($address: String!, $block: Block_height) { + pluginMembers(block: $block, where: { address: : $address }) { + address + balance + votingPower + delegatee { + address + } + delegators { + address + } + } + } +`; + +// query MyQuery { +// pluginMembers(where: {address: "0x05c1abef7664f65b0a8d5b3fe8e6b817ea9d3d90"}) { +// address +// } +// } diff --git a/packages/js-client/src/internal/graphql-queries/members.ts b/packages/js-client/src/internal/graphql-queries/members.ts index b3125057..0d62bd20 100644 --- a/packages/js-client/src/internal/graphql-queries/members.ts +++ b/packages/js-client/src/internal/graphql-queries/members.ts @@ -15,3 +15,38 @@ export const QueryPluginMembers = gql` } } `; + +export const QueryMemberInfo = gql` + query PluginMembers($address: String!, $block: Block_height) { + pluginMembers(block: $block, where: { address: : $address }) { + address + balance + votingPower + delegatee { + address + } + delegators { + address + } + } + } +`; + +export const QueryMemberProposals = gql` + query ProposalsByCreator( + $pluginAddress: String! + $creatorAddress: String! + $block: Block_height + $direction: OrderDirection! + $sortBy: PluginProposal_orderBy! + ) { + pluginProposals( + where: { plugin_: { address: $pluginAddress }, creator: $creatorAddress } + block: $block + orderDirection: $direction + orderBy: $sortBy + ) { + id + } + } +`; diff --git a/packages/js-client/src/internal/graphql-queries/settings.ts b/packages/js-client/src/internal/graphql-queries/settings.ts index 52f0ffc3..549388d4 100644 --- a/packages/js-client/src/internal/graphql-queries/settings.ts +++ b/packages/js-client/src/internal/graphql-queries/settings.ts @@ -18,6 +18,7 @@ export const QueryPluginSettings = gql` id proposalsCount } + hasGovernanceEnabled } } `; diff --git a/packages/js-client/src/internal/interfaces.ts b/packages/js-client/src/internal/interfaces.ts index 392f232e..4c60fd5d 100644 --- a/packages/js-client/src/internal/interfaces.ts +++ b/packages/js-client/src/internal/interfaces.ts @@ -17,6 +17,7 @@ import { ProposalQueryParams, AddAddressesParams, RemoveAddressesParams, + ProposalSortBy, } from '@aragon/sdk-client'; import { GasFeeEstimation, @@ -24,6 +25,7 @@ import { DaoAction, InterfaceParams, ProposalMetadata, + SortDirection, } from '@aragon/sdk-client-common'; export interface IGaslessVotingClient { @@ -50,13 +52,12 @@ export interface IGaslessVotingClientMethods { getProposal( proposalId: string, daoName?: string, - daoAddress?: string, + daoAddress?: string ): Promise; // - getProposals(params: - ProposalQueryParams & { pluginAddress: string }): Promise< - GaslessVotingProposalListItem[] - > + getProposals( + params: ProposalQueryParams & { pluginAddress: string } + ): Promise; // getVotingSettings( pluginAddress: string, @@ -74,6 +75,7 @@ export interface IGaslessVotingClientMethods { ): Promise; approve( proposalId: string, + tryExecution: boolean ): Promise>; setTally( proposalId: string, @@ -83,9 +85,15 @@ export interface IGaslessVotingClientMethods { proposalId: string, tryExecutio: boolean ): AsyncGenerator; - executeProposal( - proposalId: string - ): AsyncGenerator; + executeProposal(proposalId: string): AsyncGenerator; + getDelegatee(tokenAddress: string): Promise; + getMemberProposals( + pluginAddress: string, + creatorAddress: string, + blockNumber: number, + direction: SortDirection, + sortBy: ProposalSortBy + ): Promise; pinMetadata(params: ProposalMetadata): Promise; } export interface IGaslessVotingClientEstimation { @@ -96,12 +104,12 @@ export interface IGaslessVotingClientEstimation { createProposal( params: CreateGasslessProposalParams ): Promise; - setTally( + setTally(proposalId: string, results: bigint[][]): Promise; + approve(proposalId: string, tryExecution: boolean): Promise; + approveTally( proposalId: string, - results: bigint[][] + tryExecution: boolean ): Promise; - approve(proposalId: string): Promise; - approveTally(proposalId: string, tryExecution: boolean): Promise; executeProposal(proposalId: string): Promise; // Add any estimation methods that you need } @@ -116,19 +124,15 @@ export interface IGaslessVotingClientEncoding { pluginAddress: string, params: GaslessPluginVotingSettings ): DaoAction; - addAddressesAction( - params: AddAddressesParams, - ): DaoAction; - removeAddressesAction( - params: RemoveAddressesParams, - ): DaoAction; + addAddressesAction(params: AddAddressesParams): DaoAction; + removeAddressesAction(params: RemoveAddressesParams): DaoAction; } export interface IGaslessVotingClientDecoding { // Fill with methods that encode actions that can be passed to a proposal // encodeAction(data: Uint8Array): params; findInterface(data: Uint8Array): InterfaceParams | null; addAddressesAction(data: Uint8Array): string[]; - removeAddressesAction(data: Uint8Array): string[] + removeAddressesAction(data: Uint8Array): string[]; updatePluginSettingsAction(data: Uint8Array): GaslessPluginVotingSettings; mintTokenAction(data: Uint8Array): MintTokenParams; } diff --git a/packages/js-client/src/internal/modules/estimation.ts b/packages/js-client/src/internal/modules/estimation.ts index c08b9e69..07d70808 100644 --- a/packages/js-client/src/internal/modules/estimation.ts +++ b/packages/js-client/src/internal/modules/estimation.ts @@ -110,7 +110,10 @@ export class GaslessVotingClientEstimation * @return {*} {Promise} * @memberof GaslessVotingClientEstimation */ - public async approve(proposalId: string): Promise { + public async approve( + proposalId: string, + tryExecution = false + ): Promise { const signer = this.web3.getConnectedSigner(); const { pluginAddress, id } = decodeProposalId(proposalId); @@ -135,7 +138,7 @@ export class GaslessVotingClientEstimation } else { estimatedGasFee = await gaslessVotingContract.estimateGas.approveTally( id, - false + tryExecution ); } @@ -149,7 +152,10 @@ export class GaslessVotingClientEstimation * @return {*} {Promise} * @memberof GaslessVotingClientEstimation */ - public async approveTally(proposalId: string, tryExecution=false): Promise { + public async approveTally( + proposalId: string, + tryExecution = false + ): Promise { const signer = this.web3.getConnectedSigner(); const { pluginAddress, id } = decodeProposalId(proposalId); @@ -158,8 +164,8 @@ export class GaslessVotingClientEstimation signer ); - - const estimatedGasFee = await gaslessVotingContract.estimateGas.approveTally(id, tryExecution); + const estimatedGasFee = + await gaslessVotingContract.estimateGas.approveTally(id, tryExecution); return this.web3.getApproximateGasFee(estimatedGasFee.toBigInt()); } diff --git a/packages/js-client/src/internal/modules/methods.ts b/packages/js-client/src/internal/modules/methods.ts index 189b707d..e4d82d44 100644 --- a/packages/js-client/src/internal/modules/methods.ts +++ b/packages/js-client/src/internal/modules/methods.ts @@ -13,6 +13,7 @@ import { import { INSTALLATION_ABI } from '../constants'; import { GaslessVotingClientCore } from '../core'; import { + QueryMemberProposals, QueryPluginMembers, QueryPluginProposal, QueryPluginProposals, @@ -26,6 +27,7 @@ import { toNewProposal, toTokenVotingMember, vochainResultsToSCResults, + vochainVoteResultsToProposal, } from '../utils'; import { GovernanceWrappedERC20__factory } from '@aragon/osx-ethers'; import { @@ -338,7 +340,9 @@ export class GaslessVotingClientMethods description: '', resources: [], }; - vochainProposal.census; + proposal.tally = vochainVoteResultsToProposal( + vochainProposal.questions + ); proposal.census = vochainProposal.census; }) ); @@ -463,6 +467,46 @@ export class GaslessVotingClientMethods ); } + /** + * Retrieves the proposals created by a specific member for a given plugin. + * + * @param pluginAddress - The address of the plugin. + * @param creatorAddress - The address of the creator/member. + * @param skip - The number of proposals to skip (default: 0). + * @param limit - The maximum number of proposals to retrieve (default: 10). + * @param direction - The sorting direction for the proposals (default: SortDirection.ASC). + * @param sortBy - The field to sort the proposals by (default: ProposalSortBy.CREATED_AT). + * @returns A promise that resolves to an array of proposal IDs. + */ + public async getMemberProposals( + pluginAddress: string, + creatorAddress: string, + blockNumber = 0, + direction = SortDirection.ASC, + sortBy = ProposalSortBy.CREATED_AT + ): Promise { + if (!isAddress(pluginAddress) || !isAddress(creatorAddress)) { + Promise.reject(new InvalidAddressError()); + } + + const query = QueryMemberProposals; + const params = { + pluginAddress: pluginAddress.toLowerCase(), + creatorAddress: creatorAddress.toLowerCase(), + block: blockNumber ? { number: blockNumber } : null, + direction, + sortBy, + }; + const name = 'GaslessVoting member proposals'; + type T = { pluginProposals: Array<{ id: string }> }; + const { pluginProposals } = await this.graphql.request({ + query, + params, + name, + }); + return pluginProposals.map((proposal) => proposal.id); + } + /** * Wrapps the setTally, approve and execute function * @@ -472,7 +516,8 @@ export class GaslessVotingClientMethods * @memberof GaslessVotingClientMethods */ public async approve( - proposalId: string + proposalId: string, + tryExecution = false ): Promise> { const signer = this.web3.getConnectedSigner(); @@ -499,7 +544,7 @@ export class GaslessVotingClientMethods vochainResultsToSCResults(proposal.vochain.metadata) ); } - return this.approveTally(proposalId, false); + return this.approveTally(proposalId, tryExecution); } /** @@ -640,6 +685,24 @@ export class GaslessVotingClientMethods ); } + /** + * Retrieves the current signer's delegatee for the given token + * + * @param {string} tokenAddress + * @return {*} {Promise} + * @memberof GaslessVotingClientMethods + */ + public async getDelegatee(tokenAddress: string): Promise { + const signer = this.web3.getConnectedSigner(); + const governanceErc20Contract = GovernanceWrappedERC20__factory.connect( + tokenAddress, + signer + ); + const address = await signer.getAddress(); + const delegatee = await governanceErc20Contract.delegates(address); + return address === delegatee ? null : delegatee; + } + /** * Checks whether the current proposal can be executed * diff --git a/packages/js-client/src/internal/utils.ts b/packages/js-client/src/internal/utils.ts index d85a137f..e282c740 100644 --- a/packages/js-client/src/internal/utils.ts +++ b/packages/js-client/src/internal/utils.ts @@ -11,6 +11,7 @@ import { SubgraphVotingMember, GaslessVotingProposalSubgraph, GaslessVotingProposalListItem, + ProposalParametersStructOutput, } from '../types'; import { MintTokenParams, @@ -108,7 +109,7 @@ export function votingSettingsfromContract( } export function proposalParamsfromContract( - params: VocdoniVoting.ProposalParametersStructOutput + params: ProposalParametersStructOutput ): GaslessProposalParametersStruct { return { securityBlock: params.securityBlock.toNumber(), @@ -201,7 +202,7 @@ export function toGaslessVotingProposalListItem( inproposal as GaslessVotingProposalSubgraph ); - let result = proposal.tally as TokenVotingProposalResult; + let result = inproposal.tally as TokenVotingProposalResult; const participation = getErc20VotingParticipation( settings.minParticipation, result.abstain + result.no + result.yes, @@ -239,7 +240,7 @@ export function toGaslessVotingProposalListItem( proposal.tallyEndDate as Date, hasSucceeded ), - result: proposal.tally, + result: inproposal.tally, } as GaslessVotingProposalListItem; } diff --git a/packages/js-client/src/types.ts b/packages/js-client/src/types.ts index 0f24df0c..0a9b43e0 100644 --- a/packages/js-client/src/types.ts +++ b/packages/js-client/src/types.ts @@ -15,7 +15,6 @@ import { ProposalListItemBase, } from '@aragon/sdk-client-common'; import { BigNumber } from '@ethersproject/bignumber'; -import { VocdoniVoting } from '@vocdoni/gasless-voting-ethers'; import { PublishedElection } from '@vocdoni/sdk'; // extend the ContextParams interface with the params that you need @@ -114,6 +113,7 @@ export type GaslessPluginVotingSettings = { minProposerVotingPower: bigint; censusStrategy: string; daoTokenAddress?: string; // calculated during the DAO installation + hasGovernanceEnabled?: boolean; onlyExecutionMultisigProposalCreation?: boolean; id?: string; executionMultisigMembers?: string[]; @@ -134,6 +134,24 @@ export type GaslessProposalParametersStruct = { censusRoot: string; // the hex census root as provided by census3 }; +export type ProposalParametersStructOutput = [ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + string +] & { + securityBlock: BigNumber; + startDate: BigNumber; + voteEndDate: BigNumber; + tallyEndDate: BigNumber; + totalVotingPower: BigNumber; + censusURI: string; + censusRoot: string; +}; + export type GaslessProposalParametersContractStruct = { securityBlock: bigint; startDate: bigint; @@ -301,7 +319,7 @@ export type ProposalFromSC = { executed: boolean; approvers: string[]; vochainProposalId: string; - parameters: VocdoniVoting.ProposalParametersStructOutput; + parameters: ProposalParametersStructOutput; allowFailureMap: BigNumber; tally: BigNumber[][]; actions: IDAO.ActionStructOutput[]; diff --git a/packages/subgraph/abis/ERC20.json b/packages/subgraph/abis/ERC20.json new file mode 100644 index 00000000..a784675d --- /dev/null +++ b/packages/subgraph/abis/ERC20.json @@ -0,0 +1,297 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20", + "sourceName": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "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": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "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": "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" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000bcb38038062000bcb83398101604081905262000034916200011f565b600362000042838262000218565b50600462000051828262000218565b505050620002e4565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008257600080fd5b81516001600160401b03808211156200009f576200009f6200005a565b604051601f8301601f19908116603f01168101908282118183101715620000ca57620000ca6200005a565b81604052838152602092508683858801011115620000e757600080fd5b600091505b838210156200010b5785820183015181830184015290820190620000ec565b600093810190920192909252949350505050565b600080604083850312156200013357600080fd5b82516001600160401b03808211156200014b57600080fd5b620001598683870162000070565b935060208501519150808211156200017057600080fd5b506200017f8582860162000070565b9150509250929050565b600181811c908216806200019e57607f821691505b602082108103620001bf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021357600081815260208120601f850160051c81016020861015620001ee5750805b601f850160051c820191505b818110156200020f57828155600101620001fa565b5050505b505050565b81516001600160401b038111156200023457620002346200005a565b6200024c8162000245845462000189565b84620001c5565b602080601f8311600181146200028457600084156200026b5750858301515b600019600386901b1c1916600185901b1785556200020f565b600085815260208120601f198616915b82811015620002b55788860151825594840194600190910190840162000294565b5085821015620002d45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6108d780620002f46000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b8063395093511461014357806370a082311461015657806395d89b411461017f57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101e6565b6040516100e3919061074a565b60405180910390f35b6100ff6100fa3660046107b4565b610278565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046107de565b610292565b604051601281526020016100e3565b6100ff6101513660046107b4565b6102b6565b61011361016436600461081a565b6001600160a01b031660009081526020819052604090205490565b6100d66102f5565b6100ff6101953660046107b4565b610304565b6100ff6101a83660046107b4565b6103b3565b6101136101bb36600461083c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101f59061086f565b80601f01602080910402602001604051908101604052809291908181526020018280546102219061086f565b801561026e5780601f106102435761010080835404028352916020019161026e565b820191906000526020600020905b81548152906001019060200180831161025157829003601f168201915b5050505050905090565b6000336102868185856103c1565b60019150505b92915050565b6000336102a08582856104e5565b6102ab858585610577565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061028690829086906102f09087906108a9565b6103c1565b6060600480546101f59061086f565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156103a65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102ab82868684036103c1565b600033610286818585610577565b6001600160a01b0383166104235760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161039d565b6001600160a01b0382166104845760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161039d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461057157818110156105645760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161039d565b61057184848484036103c1565b50505050565b6001600160a01b0383166105f35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161039d565b6001600160a01b0382166106555760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161039d565b6001600160a01b038316600090815260208190526040902054818110156106e45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161039d565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610571565b600060208083528351808285015260005b818110156107775785810183015185820160400152820161075b565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107af57600080fd5b919050565b600080604083850312156107c757600080fd5b6107d083610798565b946020939093013593505050565b6000806000606084860312156107f357600080fd5b6107fc84610798565b925061080a60208501610798565b9150604084013590509250925092565b60006020828403121561082c57600080fd5b61083582610798565b9392505050565b6000806040838503121561084f57600080fd5b61085883610798565b915061086660208401610798565b90509250929050565b600181811c9082168061088357607f821691505b6020821081036108a357634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561028c57634e487b7160e01b600052601160045260246000fdfea164736f6c6343000811000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b8063395093511461014357806370a082311461015657806395d89b411461017f57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101e6565b6040516100e3919061074a565b60405180910390f35b6100ff6100fa3660046107b4565b610278565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046107de565b610292565b604051601281526020016100e3565b6100ff6101513660046107b4565b6102b6565b61011361016436600461081a565b6001600160a01b031660009081526020819052604090205490565b6100d66102f5565b6100ff6101953660046107b4565b610304565b6100ff6101a83660046107b4565b6103b3565b6101136101bb36600461083c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101f59061086f565b80601f01602080910402602001604051908101604052809291908181526020018280546102219061086f565b801561026e5780601f106102435761010080835404028352916020019161026e565b820191906000526020600020905b81548152906001019060200180831161025157829003601f168201915b5050505050905090565b6000336102868185856103c1565b60019150505b92915050565b6000336102a08582856104e5565b6102ab858585610577565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061028690829086906102f09087906108a9565b6103c1565b6060600480546101f59061086f565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156103a65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102ab82868684036103c1565b600033610286818585610577565b6001600160a01b0383166104235760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161039d565b6001600160a01b0382166104845760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161039d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461057157818110156105645760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161039d565b61057184848484036103c1565b50505050565b6001600160a01b0383166105f35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161039d565b6001600160a01b0382166106555760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161039d565b6001600160a01b038316600090815260208190526040902054818110156106e45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161039d565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610571565b600060208083528351808285015260005b818110156107775785810183015185820160400152820161075b565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107af57600080fd5b919050565b600080604083850312156107c757600080fd5b6107d083610798565b946020939093013593505050565b6000806000606084860312156107f357600080fd5b6107fc84610798565b925061080a60208501610798565b9150604084013590509250925092565b60006020828403121561082c57600080fd5b61083582610798565b9392505050565b6000806040838503121561084f57600080fd5b61085883610798565b915061086660208401610798565b90509250929050565b600181811c9082168061088357607f821691505b6020821081036108a357634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561028c57634e487b7160e01b600052601160045260246000fdfea164736f6c6343000811000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/packages/subgraph/manifest/data/sepolia.json b/packages/subgraph/manifest/data/sepolia.json new file mode 100644 index 00000000..cb841397 --- /dev/null +++ b/packages/subgraph/manifest/data/sepolia.json @@ -0,0 +1,13 @@ +{ + "info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest", + "network": "sepolia", + "dataSources": { + "PluginSetupProcessors": [ + { + "name": "PluginSetupProcessor", + "address": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f", + "startBlock": 4421516 + } + ] + } +} diff --git a/packages/subgraph/manifest/subgraph.placeholder.yaml b/packages/subgraph/manifest/subgraph.placeholder.yaml index bcf87624..7ab72248 100644 --- a/packages/subgraph/manifest/subgraph.placeholder.yaml +++ b/packages/subgraph/manifest/subgraph.placeholder.yaml @@ -27,6 +27,8 @@ dataSources: file: ./imported/PluginSetupProcessor.json - name: ERC165 file: ./abis/ERC165.json + - name: ERC20 + file: ./abis/ERC20.json eventHandlers: - event: InstallationPrepared(indexed address,indexed address,bytes32,indexed address,(uint8,uint16),bytes,address,(address[],(uint8,address,address,address,bytes32)[])) handler: handleInstallationPrepared @@ -59,6 +61,10 @@ templates: abis: - name: VocdoniVoting file: $PLUGIN_MODULE/artifacts/src/VocdoniVoting.sol/VocdoniVoting.json + - name: ERC165 + file: ./abis/ERC165.json + - name: ERC20 + file: ./abis/ERC20.json eventHandlers: - event: PluginSettingsUpdated(bool,indexed uint16,uint32,uint32,uint64,uint64,indexed address,indexed string,uint256) handler: handlePluginSettingsUpdated diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index e1f08230..514a9356 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -21,8 +21,8 @@ }, "devDependencies": { "osx-ethersV120": "npm:@aragon/osx-ethers@1.2.1", - "@graphprotocol/graph-cli": "^0.51.0", - "@graphprotocol/graph-ts": "^0.31.0", + "@graphprotocol/graph-cli": "^0.68.0", + "@graphprotocol/graph-ts": "^0.32.0", "matchstick-as": "^0.5.2", "mustache": "^4.2.0", "ts-morph": "^17.0.1", diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index 2b1918ac..bb7a7c0d 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -57,6 +57,7 @@ type Plugin implements PluginInstallation @entity { daoTokenAddress: String censusStrategyURI: Bytes minProposerVotingPower: BigInt + hasGovernanceEnabled: Boolean executionMultisigMembers: [String!] diff --git a/packages/subgraph/scripts/deploy-subgraph.sh b/packages/subgraph/scripts/deploy-subgraph.sh index 2fe68d37..1ec529e9 100755 --- a/packages/subgraph/scripts/deploy-subgraph.sh +++ b/packages/subgraph/scripts/deploy-subgraph.sh @@ -45,13 +45,12 @@ then --ipfs http://localhost:5001 \ --node http://localhost:8020 else - graph deploy $FULLNAME \ + graph deploy --studio $FULLNAME \ --version-label $SUBGRAPH_VERSION \ - --node https://app.satsuma.xyz/api/subgraphs/deploy \ --deploy-key $GRAPH_KEY > deploy-output.txt SUBGRAPH_ID=$(grep "Build completed:" deploy-output.txt | grep -oE "Qm[a-zA-Z0-9]{44}") rm deploy-output.txt echo "The Graph deployment complete: ${SUBGRAPH_ID}" -fi \ No newline at end of file +fi diff --git a/packages/subgraph/src/plugin/plugin.ts b/packages/subgraph/src/plugin/plugin.ts index 0c581b1a..eed41542 100644 --- a/packages/subgraph/src/plugin/plugin.ts +++ b/packages/subgraph/src/plugin/plugin.ts @@ -1,9 +1,10 @@ import {getPluginInstallationId} from '../../commons/ids'; +import {ERC20} from '../../generated/PluginSetupProcessor/ERC20'; +import {ERC165} from '../../generated/PluginSetupProcessor/ERC165'; import { Action, Dao, Plugin, - PluginMember, PluginProposal, PluginProposalMember, TallyElement, @@ -26,6 +27,13 @@ import { dataSource, } from '@graphprotocol/graph-ts'; +export const ERC165_INTERFACE_ID = '0x01ffc9a7'; +export const GOVERNANCE_SUPPORTED_INTERFACE_IDS: string[] = [ + '0xe90fb3f6', + '0xe90fb3f6', + '0x0f13099a', +]; + export function handlePluginSettingsUpdated( event: PluginSettingsUpdated ): void { @@ -59,6 +67,39 @@ export function handlePluginSettingsUpdated( pluginEntity.daoTokenAddress = event.params.daoTokenAddress.toHexString(); pluginEntity.minProposerVotingPower = event.params.minProposerVotingPower; pluginEntity.censusStrategyURI = event.params.censusStrategyURI; + + let hasGovernanceEnabled = false; + // If it's not ERC20 token, is not a governance-compatible + let token20Contract = ERC20.bind(event.params.daoTokenAddress); + let balanceOf = token20Contract.try_balanceOf(pluginAddress); + let totalSupply = token20Contract.try_totalSupply(); + if (balanceOf.reverted || totalSupply.reverted) { + hasGovernanceEnabled = false; + } else { + // It's a ERC20 token, check if it's governanceERC165 and has all the governance interfaces + let tokenContract = ERC165.bind(event.params.daoTokenAddress); + let supportsInterface = tokenContract.try_supportsInterface( + Bytes.fromHexString(ERC165_INTERFACE_ID) + ); + if (!supportsInterface.reverted) { + for ( + let index = 0; + index < GOVERNANCE_SUPPORTED_INTERFACE_IDS.length; + index++ + ) { + let interfaceId = GOVERNANCE_SUPPORTED_INTERFACE_IDS[index]; + supportsInterface = tokenContract.try_supportsInterface( + Bytes.fromHexString(interfaceId) + ); + if (!supportsInterface.reverted && supportsInterface.value) { + hasGovernanceEnabled = true; + break; + } + } + } + } + + pluginEntity.hasGovernanceEnabled = hasGovernanceEnabled; pluginEntity.save(); } diff --git a/packages/subgraph/utils/constants.ts b/packages/subgraph/utils/constants.ts index ccf5f804..56f6cca9 100644 --- a/packages/subgraph/utils/constants.ts +++ b/packages/subgraph/utils/constants.ts @@ -1,4 +1,4 @@ export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000'; export const PLUGIN_INTERFACE = '0x11223344'; -export const PLUGIN_REPO_ADDRESS = '0x74057f3f3809a874f28e3ebe80a1f1a5a137b64e'; // make sure address are lowercased +export const PLUGIN_REPO_ADDRESS = '0xb663C36d6fd959beeF2b82Bb40823660FEAaa55f'; // make sure address are lowercased