From d160b60125960360dc519018589b6b9988f09c84 Mon Sep 17 00:00:00 2001 From: tbwebb22 Date: Thu, 20 Oct 2022 16:29:27 -0400 Subject: [PATCH] Deploy to Goerli --- deployments/goerli/CallbackGnosis.json | 113 -- deployments/goerli/ClaimFactory.json | 90 -- deployments/goerli/ClaimSubsidiary.json | 368 ----- deployments/goerli/FractalModule.json | 44 +- deployments/goerli/FractalNameRegistry.json | 16 +- deployments/goerli/TokenClaim.json | 453 ++++++ deployments/goerli/TokenFactory.json | 90 -- deployments/goerli/VetoERC20Voting.json | 208 +-- deployments/goerli/VetoGuard.json | 81 +- deployments/goerli/VetoMultisigVoting.json | 843 +++++++++++ deployments/goerli/VotesToken.json | 1290 +++++++++++++++++ .../45f7710f616c39a15b2c4779b7f6d0c2.json | 200 --- .../b2fc18a2e663b1410a34647a57a06e84.json | 218 +++ .../e732611ec04617ba20476cba834fc2b4.json | 44 - 14 files changed, 2926 insertions(+), 1132 deletions(-) delete mode 100644 deployments/goerli/CallbackGnosis.json delete mode 100644 deployments/goerli/ClaimFactory.json delete mode 100644 deployments/goerli/ClaimSubsidiary.json create mode 100644 deployments/goerli/TokenClaim.json delete mode 100644 deployments/goerli/TokenFactory.json create mode 100644 deployments/goerli/VetoMultisigVoting.json create mode 100644 deployments/goerli/VotesToken.json delete mode 100644 deployments/goerli/solcInputs/45f7710f616c39a15b2c4779b7f6d0c2.json create mode 100644 deployments/goerli/solcInputs/b2fc18a2e663b1410a34647a57a06e84.json delete mode 100644 deployments/goerli/solcInputs/e732611ec04617ba20476cba834fc2b4.json diff --git a/deployments/goerli/CallbackGnosis.json b/deployments/goerli/CallbackGnosis.json deleted file mode 100644 index 25336c68..00000000 --- a/deployments/goerli/CallbackGnosis.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "address": "0xA962566591284124752B7aB3b8EFDc253119b6f7", - "abi": [ - { - "inputs": [ - { - "internalType": "address[]", - "name": "_targets", - "type": "address[]" - }, - { - "internalType": "bytes[]", - "name": "_txs", - "type": "bytes[]" - }, - { - "internalType": "address", - "name": "_proxy", - "type": "address" - } - ], - "name": "multiTx", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract GnosisSafeProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "bytes", - "name": "initializer", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "proxyCreated", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x7d8b8b9722a2a20dce3ee3d6b3bcde9915cc95cc5455249c98b57b0cbf8c5a56", - "receipt": { - "to": null, - "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", - "contractAddress": "0xA962566591284124752B7aB3b8EFDc253119b6f7", - "transactionIndex": 1, - "gasUsed": "731024", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd729019472b9d865a2d6b48a34a2804f92c723e8181b25786cb426ce72dd7da9", - "transactionHash": "0x7d8b8b9722a2a20dce3ee3d6b3bcde9915cc95cc5455249c98b57b0cbf8c5a56", - "logs": [], - "blockNumber": 7752434, - "cumulativeGasUsed": "3187811", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "e732611ec04617ba20476cba834fc2b4", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_txs\",\"type\":\"bytes[]\"},{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"multiTx\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract GnosisSafeProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"initializer\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proxyCreated\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"multiTx(address[],bytes[],address)\":{\"details\":\"Utilized to bypass the txGuard / Sig Requirement \",\"params\":{\"_proxy\":\"GnosisSafe Address\",\"_targets\":\"Contract Address / Address(0) == proxy\",\"_txs\":\"Target payload\"}},\"proxyCreated(address,address,bytes,uint256)\":{\"details\":\"Method called once a proxy contract is created\",\"params\":{\"initializer\":\"Payload used to setup GnosisSafe Configuration \",\"proxy\":\"GnosisSafe address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"multiTx(address[],bytes[],address)\":{\"notice\":\"Allows Gnosis Safe txs without knowledge of the Gnosis address\"}},\"notice\":\"Operated via the GnosisFactory's createProxyWithCallback methodPurpose - Setup Gnosis Safe w/ any arb method calls\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/CallbackGnosis.sol\":\"CallbackGnosis\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\\n/// @author Richard Meissner - \\ninterface IProxy {\\n function masterCopy() external view returns (address);\\n}\\n\\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafeProxy {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\\n address internal singleton;\\n\\n /// @dev Constructor function sets address of singleton contract.\\n /// @param _singleton Singleton address.\\n constructor(address _singleton) {\\n require(_singleton != address(0), \\\"Invalid singleton address provided\\\");\\n singleton = _singleton;\\n }\\n\\n /// @dev Fallback function forwards all transactions and returns all received return data.\\n fallback() external payable {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\\n // 0xa619486e == keccak(\\\"masterCopy()\\\"). The value is right padded to 32-bytes with 0s\\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\\n mstore(0, _singleton)\\n return(0, 0x20)\\n }\\n calldatacopy(0, 0, calldatasize())\\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if eq(success, 0) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3bfdd453d9f896f7029d15bcafd11886957b320ad1764309d9f74fa059715249\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"./GnosisSafeProxy.sol\\\";\\n\\ninterface IProxyCreationCallback {\\n function proxyCreated(\\n GnosisSafeProxy proxy,\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external;\\n}\\n\",\"keccak256\":\"0x51a9ce914a6a943651c803541e44218a7ed0a2f98a94d55df66b173b5a11e365\",\"license\":\"LGPL-3.0-only\"},\"contracts/CallbackGnosis.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/ICallbackGnosis.sol\\\";\\r\\n\\r\\n/// @notice Operated via the GnosisFactory's createProxyWithCallback method\\r\\n/// @notice Purpose - Setup Gnosis Safe w/ any arb method calls\\r\\ncontract CallbackGnosis is ICallbackGnosis {\\r\\n /// @dev Method called once a proxy contract is created\\r\\n /// @param proxy GnosisSafe address\\r\\n /// @param initializer Payload used to setup GnosisSafe Configuration \\r\\n function proxyCreated(\\r\\n GnosisSafeProxy proxy,\\r\\n address,\\r\\n bytes calldata initializer,\\r\\n uint256\\r\\n ) external {\\r\\n (bytes memory txData, bytes memory signature) = abi.decode(\\r\\n initializer,\\r\\n (bytes, bytes)\\r\\n );\\r\\n\\r\\n (\\r\\n address[][] memory targets,\\r\\n bytes[][] memory txs,\\r\\n bool[] memory gnosisExecTxs\\r\\n ) = abi.decode(txData, (address[][], bytes[][], bool[]));\\r\\n\\r\\n for (uint256 i; i < targets.length; i++) {\\r\\n if (gnosisExecTxs[i]) {\\r\\n gnosisExecTx(targets[i], txs[i], address(proxy), signature);\\r\\n } else {\\r\\n multiTx(targets[i], txs[i], address(proxy));\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n /// @notice Allows Gnosis Safe txs without knowledge of the Gnosis address\\r\\n /// @dev Utilized to bypass the txGuard / Sig Requirement \\r\\n /// @param _targets Contract Address / Address(0) == proxy\\r\\n /// @param _txs Target payload\\r\\n /// @param _proxy GnosisSafe Address\\r\\n function multiTx(\\r\\n address[] memory _targets,\\r\\n bytes[] memory _txs,\\r\\n address _proxy\\r\\n ) public {\\r\\n for (uint256 i; i < _targets.length; i++) {\\r\\n (bool success, ) = address(_targets[i] == address(0) ? _proxy : _targets[i]).call(_txs[i]);\\r\\n require(success, \\\"CB001\\\");\\r\\n }\\r\\n }\\r\\n\\r\\n /// @notice Executes a tx within the context of the Gnosis Safe\\r\\n /// @dev msg.sender == GnosisSafe Address\\r\\n /// @param _targets Contract Address / Address(0) == proxy\\r\\n /// @param _txs Target payload\\r\\n /// @param _proxy GnosisSafe Address\\r\\n /// @param _signature Signatures req. to execTransaction => Gnosis Safe\\r\\n function gnosisExecTx(address[] memory _targets, bytes[] memory _txs, address _proxy, bytes memory _signature) internal {\\r\\n (bool success, ) = address(_proxy).call(\\r\\n abi.encodeWithSignature(\\r\\n \\\"execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)\\\",\\r\\n address(this), // multisend address\\r\\n 0,\\r\\n abi.encodeWithSignature(\\r\\n \\\"multiTx(address[],bytes[],address)\\\",\\r\\n _targets,\\r\\n _txs,\\r\\n _proxy\\r\\n ), // data\\r\\n 1,\\r\\n 0,\\r\\n 0,\\r\\n 0,\\r\\n address(0),\\r\\n payable(0),\\r\\n _signature\\r\\n )\\r\\n );\\r\\n require(success, \\\"CB000\\\");\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x8f6d3c2acc3a324f7e29d96a40d9ec257acbfe6dd8ad6ae2eed31e7d984fe024\",\"license\":\"Unlicense\"},\"contracts/interfaces/ICallbackGnosis.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol\\\";\\r\\n\\r\\ninterface ICallbackGnosis is IProxyCreationCallback {\\r\\n /// @notice Allows Gnosis Safe txs without knowledge of the Gnosis address\\r\\n /// @dev Utilized to bypass the txGuard / Sig Requirement\\r\\n /// @param _targets Contract Address / Address(0) == proxy\\r\\n /// @param _txs Target payload\\r\\n /// @param _proxy GnosisSafe Address\\r\\n function multiTx(\\r\\n address[] memory _targets,\\r\\n bytes[] memory _txs,\\r\\n address _proxy\\r\\n ) external;\\r\\n}\\r\\n\",\"keccak256\":\"0xd21562de27565103ae6fc439c89c1d64fa9bce6b2cc4f0841fd9eeff4a16fd83\",\"license\":\"Unlicense\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50610c44806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80631e52b5181461003b578063513aea2314610050575b600080fd5b61004e6100493660046103d6565b610063565b005b61004e61005e3660046105e4565b61015f565b600080610072848601866106b6565b9150915060008060008480602001905181019061008f91906108f2565b92509250925060005b8351811015610152578181815181106100b3576100b3610a4b565b602002602001015115610103576100fe8482815181106100d5576100d5610a4b565b60200260200101518483815181106100ef576100ef610a4b565b60200260200101518d88610289565b610140565b61014084828151811061011857610118610a4b565b602002602001015184838151811061013257610132610a4b565b60200260200101518d61015f565b8061014a81610a61565b915050610098565b5050505050505050505050565b60005b8351811015610283576000806001600160a01b031685838151811061018957610189610a4b565b60200260200101516001600160a01b0316146101be578482815181106101b1576101b1610a4b565b60200260200101516101c0565b825b6001600160a01b03168483815181106101db576101db610a4b565b60200260200101516040516101f09190610a88565b6000604051808303816000865af19150503d806000811461022d576040519150601f19603f3d011682016040523d82523d6000602084013e610232565b606091505b50509050806102705760405162461bcd60e51b8152602060048201526005602482015264434230303160d81b60448201526064015b60405180910390fd5b508061027b81610a61565b915050610162565b50505050565b6000826001600160a01b03163060008787876040516024016102ad93929190610ad0565b60408051601f198184030181529181526020820180516001600160e01b031663513aea2360e01b179052516102f79392919060019060009081908190819081908d90602401610b87565b60408051601f198184030181529181526020820180516001600160e01b031663353b090160e11b1790525161032c9190610a88565b6000604051808303816000865af19150503d8060008114610369576040519150601f19603f3d011682016040523d82523d6000602084013e61036e565b606091505b50509050806103a75760405162461bcd60e51b8152602060048201526005602482015264043423030360dc1b6044820152606401610267565b5050505050565b6001600160a01b03811681146103c357600080fd5b50565b80356103d1816103ae565b919050565b6000806000806000608086880312156103ee57600080fd5b85356103f9816103ae565b94506020860135610409816103ae565b9350604086013567ffffffffffffffff8082111561042657600080fd5b818801915088601f83011261043a57600080fd5b81358181111561044957600080fd5b89602082850101111561045b57600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156104af576104af610470565b604052919050565b600067ffffffffffffffff8211156104d1576104d1610470565b5060051b60200190565b600067ffffffffffffffff8211156104f5576104f5610470565b50601f01601f191660200190565b600082601f83011261051457600080fd5b8135610527610522826104db565b610486565b81815284602083860101111561053c57600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261056a57600080fd5b8135602061057a610522836104b7565b82815260059290921b8401810191818101908684111561059957600080fd5b8286015b848110156105d957803567ffffffffffffffff8111156105bd5760008081fd5b6105cb8986838b0101610503565b84525091830191830161059d565b509695505050505050565b6000806000606084860312156105f957600080fd5b833567ffffffffffffffff8082111561061157600080fd5b818601915086601f83011261062557600080fd5b81356020610635610522836104b7565b82815260059290921b8401810191818101908a84111561065457600080fd5b948201945b8386101561067b57853561066c816103ae565b82529482019490820190610659565b9750508701359250508082111561069157600080fd5b5061069e86828701610559565b9250506106ad604085016103c6565b90509250925092565b600080604083850312156106c957600080fd5b823567ffffffffffffffff808211156106e157600080fd5b6106ed86838701610503565b9350602085013591508082111561070357600080fd5b5061071085828601610503565b9150509250929050565b60005b8381101561073557818101518382015260200161071d565b838111156102835750506000910152565b600082601f83011261075757600080fd5b8151610765610522826104b7565b8082825260208201915060208360051b86010192508583111561078757600080fd5b602085015b8381101561087e57805167ffffffffffffffff808211156107ac57600080fd5b818801915088603f8301126107c057600080fd5b60208201516107d1610522826104b7565b81815260059190911b83016040019060208101908b8311156107f257600080fd5b604085015b838110156108665780518581111561080e57600080fd5b8601605f81018e1361081f57600080fd5b6040810151610830610522826104db565b8181528f606083850101111561084557600080fd5b61085682602083016060860161071a565b85525050602092830192016107f7565b508752505060209485019492909201915061078c9050565b5095945050505050565b600082601f83011261089957600080fd5b815160206108a9610522836104b7565b82815260059290921b840181019181810190868411156108c857600080fd5b8286015b848110156105d957805180151581146108e55760008081fd5b83529183019183016108cc565b60008060006060848603121561090757600080fd5b835167ffffffffffffffff8082111561091f57600080fd5b818601915086601f83011261093357600080fd5b81516020610943610522836104b7565b82815260059290921b8401810191818101908a84111561096257600080fd5b8286015b848110156109f85780518681111561097d57600080fd5b8701603f81018d1361098e57600080fd5b8481015161099e610522826104b7565b81815260059190911b820160400190868101908f8311156109bf5760008081fd5b6040840193505b828410156109e85783516109d9816103ae565b825292870192908701906109c6565b8652505050918301918301610966565b5091890151919750909350505080821115610a1257600080fd5b610a1e87838801610746565b93506040860151915080821115610a3457600080fd5b50610a4186828701610888565b9150509250925092565b634e487b7160e01b600052603260045260246000fd5b600060018201610a8157634e487b7160e01b600052601160045260246000fd5b5060010190565b60008251610a9a81846020870161071a565b9190910192915050565b60008151808452610abc81602086016020860161071a565b601f01601f19169290920160200192915050565b606080825284519082018190526000906020906080840190828801845b82811015610b125781516001600160a01b031684529284019290840190600101610aed565b50505083810382850152855180825282820190600581901b8301840188850160005b83811015610b6257601f19868403018552610b50838351610aa4565b94870194925090860190600101610b34565b50506001600160a01b03881660408801529450610b7f9350505050565b949350505050565b6001600160a01b038b8116825260ff8b16602083015261014060408301819052600091610bb68483018d610aa4565b60ff8c811660608701528b811660808701528a811660a0870152891660c086015287821660e08601529086166101008501528381036101208501529050610bfd8185610aa4565b9d9c5050505050505050505050505056fea2646970667358221220cf9d4494ff46310f6abf285dedcc3ee1e96d6b5641cf738c613cc91aa469a5b664736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80631e52b5181461003b578063513aea2314610050575b600080fd5b61004e6100493660046103d6565b610063565b005b61004e61005e3660046105e4565b61015f565b600080610072848601866106b6565b9150915060008060008480602001905181019061008f91906108f2565b92509250925060005b8351811015610152578181815181106100b3576100b3610a4b565b602002602001015115610103576100fe8482815181106100d5576100d5610a4b565b60200260200101518483815181106100ef576100ef610a4b565b60200260200101518d88610289565b610140565b61014084828151811061011857610118610a4b565b602002602001015184838151811061013257610132610a4b565b60200260200101518d61015f565b8061014a81610a61565b915050610098565b5050505050505050505050565b60005b8351811015610283576000806001600160a01b031685838151811061018957610189610a4b565b60200260200101516001600160a01b0316146101be578482815181106101b1576101b1610a4b565b60200260200101516101c0565b825b6001600160a01b03168483815181106101db576101db610a4b565b60200260200101516040516101f09190610a88565b6000604051808303816000865af19150503d806000811461022d576040519150601f19603f3d011682016040523d82523d6000602084013e610232565b606091505b50509050806102705760405162461bcd60e51b8152602060048201526005602482015264434230303160d81b60448201526064015b60405180910390fd5b508061027b81610a61565b915050610162565b50505050565b6000826001600160a01b03163060008787876040516024016102ad93929190610ad0565b60408051601f198184030181529181526020820180516001600160e01b031663513aea2360e01b179052516102f79392919060019060009081908190819081908d90602401610b87565b60408051601f198184030181529181526020820180516001600160e01b031663353b090160e11b1790525161032c9190610a88565b6000604051808303816000865af19150503d8060008114610369576040519150601f19603f3d011682016040523d82523d6000602084013e61036e565b606091505b50509050806103a75760405162461bcd60e51b8152602060048201526005602482015264043423030360dc1b6044820152606401610267565b5050505050565b6001600160a01b03811681146103c357600080fd5b50565b80356103d1816103ae565b919050565b6000806000806000608086880312156103ee57600080fd5b85356103f9816103ae565b94506020860135610409816103ae565b9350604086013567ffffffffffffffff8082111561042657600080fd5b818801915088601f83011261043a57600080fd5b81358181111561044957600080fd5b89602082850101111561045b57600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156104af576104af610470565b604052919050565b600067ffffffffffffffff8211156104d1576104d1610470565b5060051b60200190565b600067ffffffffffffffff8211156104f5576104f5610470565b50601f01601f191660200190565b600082601f83011261051457600080fd5b8135610527610522826104db565b610486565b81815284602083860101111561053c57600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261056a57600080fd5b8135602061057a610522836104b7565b82815260059290921b8401810191818101908684111561059957600080fd5b8286015b848110156105d957803567ffffffffffffffff8111156105bd5760008081fd5b6105cb8986838b0101610503565b84525091830191830161059d565b509695505050505050565b6000806000606084860312156105f957600080fd5b833567ffffffffffffffff8082111561061157600080fd5b818601915086601f83011261062557600080fd5b81356020610635610522836104b7565b82815260059290921b8401810191818101908a84111561065457600080fd5b948201945b8386101561067b57853561066c816103ae565b82529482019490820190610659565b9750508701359250508082111561069157600080fd5b5061069e86828701610559565b9250506106ad604085016103c6565b90509250925092565b600080604083850312156106c957600080fd5b823567ffffffffffffffff808211156106e157600080fd5b6106ed86838701610503565b9350602085013591508082111561070357600080fd5b5061071085828601610503565b9150509250929050565b60005b8381101561073557818101518382015260200161071d565b838111156102835750506000910152565b600082601f83011261075757600080fd5b8151610765610522826104b7565b8082825260208201915060208360051b86010192508583111561078757600080fd5b602085015b8381101561087e57805167ffffffffffffffff808211156107ac57600080fd5b818801915088603f8301126107c057600080fd5b60208201516107d1610522826104b7565b81815260059190911b83016040019060208101908b8311156107f257600080fd5b604085015b838110156108665780518581111561080e57600080fd5b8601605f81018e1361081f57600080fd5b6040810151610830610522826104db565b8181528f606083850101111561084557600080fd5b61085682602083016060860161071a565b85525050602092830192016107f7565b508752505060209485019492909201915061078c9050565b5095945050505050565b600082601f83011261089957600080fd5b815160206108a9610522836104b7565b82815260059290921b840181019181810190868411156108c857600080fd5b8286015b848110156105d957805180151581146108e55760008081fd5b83529183019183016108cc565b60008060006060848603121561090757600080fd5b835167ffffffffffffffff8082111561091f57600080fd5b818601915086601f83011261093357600080fd5b81516020610943610522836104b7565b82815260059290921b8401810191818101908a84111561096257600080fd5b8286015b848110156109f85780518681111561097d57600080fd5b8701603f81018d1361098e57600080fd5b8481015161099e610522826104b7565b81815260059190911b820160400190868101908f8311156109bf5760008081fd5b6040840193505b828410156109e85783516109d9816103ae565b825292870192908701906109c6565b8652505050918301918301610966565b5091890151919750909350505080821115610a1257600080fd5b610a1e87838801610746565b93506040860151915080821115610a3457600080fd5b50610a4186828701610888565b9150509250925092565b634e487b7160e01b600052603260045260246000fd5b600060018201610a8157634e487b7160e01b600052601160045260246000fd5b5060010190565b60008251610a9a81846020870161071a565b9190910192915050565b60008151808452610abc81602086016020860161071a565b601f01601f19169290920160200192915050565b606080825284519082018190526000906020906080840190828801845b82811015610b125781516001600160a01b031684529284019290840190600101610aed565b50505083810382850152855180825282820190600581901b8301840188850160005b83811015610b6257601f19868403018552610b50838351610aa4565b94870194925090860190600101610b34565b50506001600160a01b03881660408801529450610b7f9350505050565b949350505050565b6001600160a01b038b8116825260ff8b16602083015261014060408301819052600091610bb68483018d610aa4565b60ff8c811660608701528b811660808701528a811660a0870152891660c086015287821660e08601529086166101008501528381036101208501529050610bfd8185610aa4565b9d9c5050505050505050505050505056fea2646970667358221220cf9d4494ff46310f6abf285dedcc3ee1e96d6b5641cf738c613cc91aa469a5b664736f6c634300080d0033", - "devdoc": { - "kind": "dev", - "methods": { - "multiTx(address[],bytes[],address)": { - "details": "Utilized to bypass the txGuard / Sig Requirement ", - "params": { - "_proxy": "GnosisSafe Address", - "_targets": "Contract Address / Address(0) == proxy", - "_txs": "Target payload" - } - }, - "proxyCreated(address,address,bytes,uint256)": { - "details": "Method called once a proxy contract is created", - "params": { - "initializer": "Payload used to setup GnosisSafe Configuration ", - "proxy": "GnosisSafe address" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "multiTx(address[],bytes[],address)": { - "notice": "Allows Gnosis Safe txs without knowledge of the Gnosis address" - } - }, - "notice": "Operated via the GnosisFactory's createProxyWithCallback methodPurpose - Setup Gnosis Safe w/ any arb method calls", - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/deployments/goerli/ClaimFactory.json b/deployments/goerli/ClaimFactory.json deleted file mode 100644 index 42b8f183..00000000 --- a/deployments/goerli/ClaimFactory.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "address": "0x1E641C2f522E823F1294640DD1D0083CA356BbF6", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "subsidiaryAddress", - "type": "address" - } - ], - "name": "SubsidiaryCreated", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "creator", - "type": "address" - }, - { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" - } - ], - "name": "create", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x00c0e6eca22b4d408f2e44bfd6b83e9429ea22b25df73832a3a0aec3dfe38f65", - "receipt": { - "to": null, - "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", - "contractAddress": "0x1E641C2f522E823F1294640DD1D0083CA356BbF6", - "transactionIndex": 11, - "gasUsed": "755727", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x54d0209c0d2e35a5edbfc64389efe090bbb178fe211c3cd661be8f553b921e90", - "transactionHash": "0x00c0e6eca22b4d408f2e44bfd6b83e9429ea22b25df73832a3a0aec3dfe38f65", - "logs": [], - "blockNumber": 7752436, - "cumulativeGasUsed": "4670075", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "45f7710f616c39a15b2c4779b7f6d0c2", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subsidiaryAddress\",\"type\":\"address\"}],\"name\":\"SubsidiaryCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"create\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"create(address,bytes[])\":{\"details\":\"Creates an ERC-20 votes token\",\"params\":{\"creator\":\"The address creating the module\",\"data\":\"The array of bytes used to create the token\"},\"returns\":{\"_0\":\"address The address of the created token\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Token Factory used to deploy votes tokens\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ClaimFactory.sol\":\"ClaimFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Create2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Create2.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\\n * `CREATE2` can be used to compute in advance the address where a smart\\n * contract will be deployed, which allows for interesting new mechanisms known\\n * as 'counterfactual interactions'.\\n *\\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\\n * information.\\n */\\nlibrary Create2 {\\n /**\\n * @dev Deploys a contract using `CREATE2`. The address where the contract\\n * will be deployed can be known in advance via {computeAddress}.\\n *\\n * The bytecode for a contract can be obtained from Solidity with\\n * `type(contractName).creationCode`.\\n *\\n * Requirements:\\n *\\n * - `bytecode` must not be empty.\\n * - `salt` must have not been used for `bytecode` already.\\n * - the factory must have a balance of at least `amount`.\\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\\n */\\n function deploy(\\n uint256 amount,\\n bytes32 salt,\\n bytes memory bytecode\\n ) internal returns (address) {\\n address addr;\\n require(address(this).balance >= amount, \\\"Create2: insufficient balance\\\");\\n require(bytecode.length != 0, \\\"Create2: bytecode length is zero\\\");\\n /// @solidity memory-safe-assembly\\n assembly {\\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\\n }\\n require(addr != address(0), \\\"Create2: Failed on deploy\\\");\\n return addr;\\n }\\n\\n /**\\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\\n * `bytecodeHash` or `salt` will result in a new destination address.\\n */\\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\\n return computeAddress(salt, bytecodeHash, address(this));\\n }\\n\\n /**\\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\\n */\\n function computeAddress(\\n bytes32 salt,\\n bytes32 bytecodeHash,\\n address deployer\\n ) internal pure returns (address) {\\n bytes32 _data = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash));\\n return address(uint160(uint256(_data)));\\n }\\n}\\n\",\"keccak256\":\"0x62237e1773cbf99739b7019f3772a2ff5360d56edb69751b513237f5fcd78571\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"contracts/ClaimFactory.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/IClaimFactory.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/Create2.sol\\\";\\r\\n\\r\\n/// @notice Token Factory used to deploy votes tokens\\r\\ncontract ClaimFactory is IClaimFactory {\\r\\n /// @dev Creates an ERC-20 votes token\\r\\n /// @param creator The address creating the module\\r\\n /// @param data The array of bytes used to create the token\\r\\n /// @return address The address of the created token\\r\\n function create(address creator, bytes[] calldata data)\\r\\n external\\r\\n override\\r\\n returns (address[] memory)\\r\\n {\\r\\n address[] memory createdContracts = new address[](1);\\r\\n\\r\\n createdContracts[0] = _createClaimSubsidiary(\\r\\n abi.decode(data[0], (address)),\\r\\n creator,\\r\\n abi.decode(data[1], (bytes32))\\r\\n );\\r\\n\\r\\n return createdContracts;\\r\\n }\\r\\n\\r\\n function _createClaimSubsidiary(\\r\\n address subImpl,\\r\\n address creator,\\r\\n bytes32 salt\\r\\n ) internal returns (address createdSubsidiary) {\\r\\n createdSubsidiary = Create2.deploy(\\r\\n 0,\\r\\n keccak256(\\r\\n abi.encodePacked(creator, msg.sender, block.chainid, salt)\\r\\n ),\\r\\n abi.encodePacked(\\r\\n type(ERC1967Proxy).creationCode,\\r\\n abi.encode(subImpl, \\\"\\\")\\r\\n )\\r\\n );\\r\\n emit SubsidiaryCreated(createdSubsidiary);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x1f665f25185d466fcffd14f9efbae8b047239fdc2bc1db9859058a1f3ee6328a\",\"license\":\"Unlicense\"},\"contracts/interfaces/IClaimFactory.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\ninterface IClaimFactory {\\r\\n event SubsidiaryCreated(address indexed subsidiaryAddress);\\r\\n\\r\\n /// @dev Creates a module\\r\\n /// @param creator The address creating the module\\r\\n /// @param data The array of bytes used to create the module\\r\\n /// @return address[] Array of the created module addresses\\r\\n function create(address creator, bytes[] calldata data) external returns (address[] memory);\\r\\n}\",\"keccak256\":\"0xb94173d2906a34eadf5f28f88e31e69c86feaa3b26201dbabf8d724d83c6ff6d\",\"license\":\"Unlicense\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50610cbb806100206000396000f3fe60806040523480156200001157600080fd5b50600436106200002e5760003560e01c80636d81fc721462000033575b600080fd5b6200004a6200004436600462000387565b62000062565b60405162000059919062000416565b60405180910390f35b60408051600180825281830190925260609160009190602080830190803683370190505090506200010584846000818110620000a257620000a262000465565b9050602002810190620000b691906200047b565b810190620000c59190620004cc565b8686866001818110620000dc57620000dc62000465565b9050602002810190620000f091906200047b565b810190620000ff9190620004f3565b6200013c565b816000815181106200011b576200011b62000465565b6001600160a01b039092166020928302919091019091015290509392505050565b6040516bffffffffffffffffffffffff19606084811b8216602084015233901b166034820152466048820152606881018290526000906200020b9082906088016040516020818303038152906040528051906020012060405180602001620001a49062000360565b601f1982820381018352601f9091011660408181526001600160a01b038a166020830152808201526000606082015260800160408051601f1981840301815290829052620001f692916020016200054b565b60405160208183030381529060405262000249565b6040519091506001600160a01b038216907ff8d08801592f8b404e23e91933cd0d3d1b52e9768daae2426a9ade0238208cf290600090a29392505050565b60008084471015620002a25760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b8251600003620002f55760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604482015260640162000299565b8383516020850187f590506001600160a01b038116620003585760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f7900000000000000604482015260640162000299565b949350505050565b610721806200056583390190565b6001600160a01b03811681146200038457600080fd5b50565b6000806000604084860312156200039d57600080fd5b8335620003aa816200036e565b9250602084013567ffffffffffffffff80821115620003c857600080fd5b818601915086601f830112620003dd57600080fd5b813581811115620003ed57600080fd5b8760208260051b85010111156200040357600080fd5b6020830194508093505050509250925092565b6020808252825182820181905260009190848201906040850190845b81811015620004595783516001600160a01b03168352928401929184019160010162000432565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126200049357600080fd5b83018035915067ffffffffffffffff821115620004af57600080fd5b602001915036819003821315620004c557600080fd5b9250929050565b600060208284031215620004df57600080fd5b8135620004ec816200036e565b9392505050565b6000602082840312156200050657600080fd5b5035919050565b6000815160005b8181101562000530576020818501810151868301520162000514565b8181111562000540576000828601525b509290920192915050565b6000620003586200055d83866200050d565b846200050d56fe608060405260405161072138038061072183398101604081905261002291610314565b61002e82826000610035565b5050610431565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106fa602791396101a9565b9392505050565b6100ea8161028760201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61029660201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102115760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610148565b600080856001600160a01b03168560405161022c91906103e2565b600060405180830381855af49150503d8060008114610267576040519150601f19603f3d011682016040523d82523d6000602084013e61026c565b606091505b50909250905061027d828286610299565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a85750816100d0565b8251156102b85782518084602001fd5b8160405162461bcd60e51b815260040161014891906103fe565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103035781810151838201526020016102eb565b838111156100645750506000910152565b6000806040838503121561032757600080fd5b82516001600160a01b038116811461033e57600080fd5b60208401519092506001600160401b038082111561035b57600080fd5b818501915085601f83011261036f57600080fd5b815181811115610381576103816102d2565b604051601f8201601f19908116603f011681019083821181831017156103a9576103a96102d2565b816040528281528860208487010111156103c257600080fd5b6103d38360208301602088016102e8565b80955050505050509250929050565b600082516103f48184602087016102e8565b9190910192915050565b602081526000825180602084015261041d8160408501602087016102e8565b601f01601f19169190910160400192915050565b6102ba806104406000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220624d8c621d429fd8b7eed49ae71e0c11f4101ae7335c4c9d149cb44a1625749c64736f6c634300080d0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203bb79259860fa39c85e190a664c07cb95b3c462efc3f5c7c1f47883821ef8cbe64736f6c634300080d0033", - "deployedBytecode": "0x60806040523480156200001157600080fd5b50600436106200002e5760003560e01c80636d81fc721462000033575b600080fd5b6200004a6200004436600462000387565b62000062565b60405162000059919062000416565b60405180910390f35b60408051600180825281830190925260609160009190602080830190803683370190505090506200010584846000818110620000a257620000a262000465565b9050602002810190620000b691906200047b565b810190620000c59190620004cc565b8686866001818110620000dc57620000dc62000465565b9050602002810190620000f091906200047b565b810190620000ff9190620004f3565b6200013c565b816000815181106200011b576200011b62000465565b6001600160a01b039092166020928302919091019091015290509392505050565b6040516bffffffffffffffffffffffff19606084811b8216602084015233901b166034820152466048820152606881018290526000906200020b9082906088016040516020818303038152906040528051906020012060405180602001620001a49062000360565b601f1982820381018352601f9091011660408181526001600160a01b038a166020830152808201526000606082015260800160408051601f1981840301815290829052620001f692916020016200054b565b60405160208183030381529060405262000249565b6040519091506001600160a01b038216907ff8d08801592f8b404e23e91933cd0d3d1b52e9768daae2426a9ade0238208cf290600090a29392505050565b60008084471015620002a25760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b8251600003620002f55760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604482015260640162000299565b8383516020850187f590506001600160a01b038116620003585760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f7900000000000000604482015260640162000299565b949350505050565b610721806200056583390190565b6001600160a01b03811681146200038457600080fd5b50565b6000806000604084860312156200039d57600080fd5b8335620003aa816200036e565b9250602084013567ffffffffffffffff80821115620003c857600080fd5b818601915086601f830112620003dd57600080fd5b813581811115620003ed57600080fd5b8760208260051b85010111156200040357600080fd5b6020830194508093505050509250925092565b6020808252825182820181905260009190848201906040850190845b81811015620004595783516001600160a01b03168352928401929184019160010162000432565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126200049357600080fd5b83018035915067ffffffffffffffff821115620004af57600080fd5b602001915036819003821315620004c557600080fd5b9250929050565b600060208284031215620004df57600080fd5b8135620004ec816200036e565b9392505050565b6000602082840312156200050657600080fd5b5035919050565b6000815160005b8181101562000530576020818501810151868301520162000514565b8181111562000540576000828601525b509290920192915050565b6000620003586200055d83866200050d565b846200050d56fe608060405260405161072138038061072183398101604081905261002291610314565b61002e82826000610035565b5050610431565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106fa602791396101a9565b9392505050565b6100ea8161028760201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61029660201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102115760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610148565b600080856001600160a01b03168560405161022c91906103e2565b600060405180830381855af49150503d8060008114610267576040519150601f19603f3d011682016040523d82523d6000602084013e61026c565b606091505b50909250905061027d828286610299565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a85750816100d0565b8251156102b85782518084602001fd5b8160405162461bcd60e51b815260040161014891906103fe565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103035781810151838201526020016102eb565b838111156100645750506000910152565b6000806040838503121561032757600080fd5b82516001600160a01b038116811461033e57600080fd5b60208401519092506001600160401b038082111561035b57600080fd5b818501915085601f83011261036f57600080fd5b815181811115610381576103816102d2565b604051601f8201601f19908116603f011681019083821181831017156103a9576103a96102d2565b816040528281528860208487010111156103c257600080fd5b6103d38360208301602088016102e8565b80955050505050509250929050565b600082516103f48184602087016102e8565b9190910192915050565b602081526000825180602084015261041d8160408501602087016102e8565b601f01601f19169190910160400192915050565b6102ba806104406000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220624d8c621d429fd8b7eed49ae71e0c11f4101ae7335c4c9d149cb44a1625749c64736f6c634300080d0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203bb79259860fa39c85e190a664c07cb95b3c462efc3f5c7c1f47883821ef8cbe64736f6c634300080d0033", - "devdoc": { - "kind": "dev", - "methods": { - "create(address,bytes[])": { - "details": "Creates an ERC-20 votes token", - "params": { - "creator": "The address creating the module", - "data": "The array of bytes used to create the token" - }, - "returns": { - "_0": "address The address of the created token" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "notice": "Token Factory used to deploy votes tokens", - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/deployments/goerli/ClaimSubsidiary.json b/deployments/goerli/ClaimSubsidiary.json deleted file mode 100644 index 89a19ba5..00000000 --- a/deployments/goerli/ClaimSubsidiary.json +++ /dev/null @@ -1,368 +0,0 @@ -{ - "address": "0x6274188E65e62ccF05BeB70a8f3fB0Ed1e002C08", - "abi": [ - { - "inputs": [], - "name": "AllocationClaimed", - "type": "error" - }, - { - "inputs": [], - "name": "NoAllocation", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "pToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "cToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "pAllocation", - "type": "uint256" - } - ], - "name": "SnapAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "pToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "cToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "claimer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "SnapClaimed", - "type": "event" - }, - { - "inputs": [], - "name": "cToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "claimer", - "type": "address" - } - ], - "name": "calculateClaimAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "cTokenAllocation", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "claimer", - "type": "address" - } - ], - "name": "claimSnap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_metaFactory", - "type": "address" - }, - { - "internalType": "address", - "name": "_pToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_cToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pAllocation", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pAllocation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "snapId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x51b08053b504766e88129544fbfdc48cc9b726a4069132ab35c091b831de5e7f", - "receipt": { - "to": null, - "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", - "contractAddress": "0x6274188E65e62ccF05BeB70a8f3fB0Ed1e002C08", - "transactionIndex": 32, - "gasUsed": "611221", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x96cb6c7f89789ba40f161079e679f01b666a8e8e59fa4a1b0ea175766b5fa6ef", - "transactionHash": "0x51b08053b504766e88129544fbfdc48cc9b726a4069132ab35c091b831de5e7f", - "logs": [], - "blockNumber": 7752437, - "cumulativeGasUsed": "14027090", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "45f7710f616c39a15b2c4779b7f6d0c2", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AllocationClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoAllocation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"pToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"cToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pAllocation\",\"type\":\"uint256\"}],\"name\":\"SnapAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"cToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SnapClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"cToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"}],\"name\":\"calculateClaimAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cTokenAllocation\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"}],\"name\":\"claimSnap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_metaFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_pToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_cToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pAllocation\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pAllocation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"calculateClaimAmount(address)\":{\"params\":{\"claimer\":\"Address which is being claimed for\"},\"returns\":{\"cTokenAllocation\":\"Users cToken allocation\"}},\"claimSnap(address)\":{\"params\":{\"claimer\":\"Address which is being claimed for\"}},\"initialize(address,address,address,uint256)\":{\"params\":{\"_cToken\":\"Address of child Token being claimed\",\"_metaFactory\":\"Address funding claimContract\",\"_pAllocation\":\"Total tokens allocated for pToken holders\",\"_pToken\":\"Address of the parent token used for snapshot reference\"}}},\"stateVariables\":{\"__gap\":{\"details\":\"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 https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"calculateClaimAmount(address)\":{\"notice\":\"Calculate a users cToken allocation\"},\"claimSnap(address)\":{\"notice\":\"This function allows pToken holders to claim cTokens\"},\"initialize(address,address,address,uint256)\":{\"notice\":\"Initilize Claim Contract\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ClaimSubsidiary.sol\":\"ClaimSubsidiary\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/governance/utils/IVotes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 IVotes {\\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 the end of a past block (`blockNumber`).\\n */\\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\\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 blockNumber) 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(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0xf5324a55ee9c0b4a840ea57c055ac9d046f88986ceef567e1cf68113e46a79c0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n }\\n _balances[to] += amount;\\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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Arrays.sol\\\";\\nimport \\\"../../../utils/Counters.sol\\\";\\n\\n/**\\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\\n * total supply at the time are recorded for later access.\\n *\\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\\n * In naive implementations it's possible to perform a \\\"double spend\\\" attack by reusing the same balance from different\\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\\n * used to create an efficient ERC20 forking mechanism.\\n *\\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\\n * and the account address.\\n *\\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\\n *\\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\\n * alternative consider {ERC20Votes}.\\n *\\n * ==== Gas Costs\\n *\\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\\n *\\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\\n * transfers will have normal cost until the next snapshot, and so on.\\n */\\n\\nabstract contract ERC20Snapshot is ERC20 {\\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\\n\\n using Arrays for uint256[];\\n using Counters for Counters.Counter;\\n\\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\\n // Snapshot struct, but that would impede usage of functions that work on an array.\\n struct Snapshots {\\n uint256[] ids;\\n uint256[] values;\\n }\\n\\n mapping(address => Snapshots) private _accountBalanceSnapshots;\\n Snapshots private _totalSupplySnapshots;\\n\\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\\n Counters.Counter private _currentSnapshotId;\\n\\n /**\\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\\n */\\n event Snapshot(uint256 id);\\n\\n /**\\n * @dev Creates a new snapshot and returns its snapshot id.\\n *\\n * Emits a {Snapshot} event that contains the same id.\\n *\\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\\n *\\n * [WARNING]\\n * ====\\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\\n * you must consider that it can potentially be used by attackers in two ways.\\n *\\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\\n * section above.\\n *\\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\\n * ====\\n */\\n function _snapshot() internal virtual returns (uint256) {\\n _currentSnapshotId.increment();\\n\\n uint256 currentId = _getCurrentSnapshotId();\\n emit Snapshot(currentId);\\n return currentId;\\n }\\n\\n /**\\n * @dev Get the current snapshotId\\n */\\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\\n return _currentSnapshotId.current();\\n }\\n\\n /**\\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\\n */\\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\\n\\n return snapshotted ? value : balanceOf(account);\\n }\\n\\n /**\\n * @dev Retrieves the total supply at the time `snapshotId` was created.\\n */\\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\\n\\n return snapshotted ? value : totalSupply();\\n }\\n\\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n if (from == address(0)) {\\n // mint\\n _updateAccountSnapshot(to);\\n _updateTotalSupplySnapshot();\\n } else if (to == address(0)) {\\n // burn\\n _updateAccountSnapshot(from);\\n _updateTotalSupplySnapshot();\\n } else {\\n // transfer\\n _updateAccountSnapshot(from);\\n _updateAccountSnapshot(to);\\n }\\n }\\n\\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\\n require(snapshotId > 0, \\\"ERC20Snapshot: id is 0\\\");\\n require(snapshotId <= _getCurrentSnapshotId(), \\\"ERC20Snapshot: nonexistent id\\\");\\n\\n // When a valid snapshot is queried, there are three possibilities:\\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\\n // to this id is the current one.\\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\\n // requested id, and its value is the one to return.\\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\\n // larger than the requested one.\\n //\\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\\n // exactly this.\\n\\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\\n\\n if (index == snapshots.ids.length) {\\n return (false, 0);\\n } else {\\n return (true, snapshots.values[index]);\\n }\\n }\\n\\n function _updateAccountSnapshot(address account) private {\\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\\n }\\n\\n function _updateTotalSupplySnapshot() private {\\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\\n }\\n\\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\\n uint256 currentId = _getCurrentSnapshotId();\\n if (_lastSnapshotId(snapshots.ids) < currentId) {\\n snapshots.ids.push(currentId);\\n snapshots.values.push(currentValue);\\n }\\n }\\n\\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\\n if (ids.length == 0) {\\n return 0;\\n } else {\\n return ids[ids.length - 1];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9f3a9fc338edd87bff11d626ee6f365ac72f03a8841c4a2938438ef81e8cf1d9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-ERC20Permit.sol\\\";\\nimport \\\"../../../utils/math/Math.sol\\\";\\nimport \\\"../../../governance/utils/IVotes.sol\\\";\\nimport \\\"../../../utils/math/SafeCast.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSA.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 ERC20Votes is IVotes, ERC20Permit {\\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 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 SafeCast.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 return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\\n }\\n\\n /**\\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_checkpoints[account], blockNumber);\\n }\\n\\n /**\\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\\n * It is but NOT the sum of all the delegated votes!\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\\n }\\n\\n /**\\n * @dev Lookup a value in a list of (sorted) checkpoints.\\n */\\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\\n //\\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 `blockNumber`, we look in [low, mid)\\n // - If the middle checkpoint is before or equal to `blockNumber`, 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 `blockNumber`, we end up with an index that is\\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\\n // the same.\\n uint256 high = ckpts.length;\\n uint256 low = 0;\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n if (ckpts[mid].fromBlock > blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n return high == 0 ? 0 : ckpts[high - 1].votes;\\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 = ECDSA.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 {DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) 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 {DelegateChanged} and {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(\\n address src,\\n address dst,\\n uint256 amount\\n ) 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 oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\\n newWeight = op(oldWeight, delta);\\n\\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\\n ckpts[pos - 1].votes = SafeCast.toUint224(newWeight);\\n } else {\\n ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(block.number), votes: SafeCast.toUint224(newWeight)}));\\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\",\"keccak256\":\"0x7fd2492be0468be4662081ee25cde38a31e4a0ceca0fed10160462389013910f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20Permit.sol\\\";\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../../../utils/Counters.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 */\\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\\n using Counters for Counters.Counter;\\n\\n mapping(address => Counters.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 constructor(string memory name) EIP712(name, \\\"1\\\") {}\\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 = ECDSA.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 Counters.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n}\\n\",\"keccak256\":\"0x07536242e24ee7067295d32c08e495a33e605f3c52f8ee4ec3bdcb7a351313d2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\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\":\"0xf41ca991f30855bf80ffd11e9347856a517b977f0a6c2d52e6421a99b7840329\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/draft-IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) 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(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) 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 function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n function safePermit(\\n IERC20Permit 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(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x032807210d1d7d218963d7355d62e021a84bf1b3339f4f50be2f63b53cccaf29\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Arrays.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to array types.\\n */\\nlibrary Arrays {\\n /**\\n * @dev Searches a sorted `array` and returns the first index that contains\\n * a value greater or equal to `element`. If no such index exists (i.e. all\\n * values in the array are strictly less than `element`), the array length is\\n * returned. Time complexity O(log n).\\n *\\n * `array` is expected to be sorted in ascending order, and to contain no\\n * repeated elements.\\n */\\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\\n if (array.length == 0) {\\n return 0;\\n }\\n\\n uint256 low = 0;\\n uint256 high = array.length;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (array[mid] > element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\\n if (low > 0 && array[low - 1] == element) {\\n return low - 1;\\n } else {\\n return low;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa7bc891be2bc5948340a8fb14ad36c8846230c9086269e37f3febf0dc239c9f7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.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 Counters {\\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\":\"0xf0018c2440fbe238dd3a8732fa8e17a0f9dce84d31451dc8a32f6d62b349c9f1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.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 ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\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 } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\\n uint256 private immutable _CACHED_CHAIN_ID;\\n address private immutable _CACHED_THIS;\\n\\n bytes32 private immutable _HASHED_NAME;\\n bytes32 private immutable _HASHED_VERSION;\\n bytes32 private immutable _TYPE_HASH;\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor(string memory name, string memory version) {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n bytes32 typeHash = keccak256(\\n \\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"\\n );\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\\n _CACHED_THIS = address(this);\\n _TYPE_HASH = typeHash;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\\n return _CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0x6688fad58b9ec0286d40fa957152e575d5d8bd4c3aa80985efdb11b44f776ae7\",\"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/ERC165Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC165.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 ERC165Storage is ERC165 {\\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\",\"keccak256\":\"0x77bf0086774bab931413c3388d3a0f7d44cf6878965b72147f57bb0fbbf394bd\",\"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\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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 Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. It 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 // 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)`.\\n // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.\\n // This gives `2**k < a <= 2**(k+1)` \\u2192 `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.\\n // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a\\n // good first aproximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1;\\n uint256 x = a;\\n if (x >> 128 > 0) {\\n x >>= 128;\\n result <<= 64;\\n }\\n if (x >> 64 > 0) {\\n x >>= 64;\\n result <<= 32;\\n }\\n if (x >> 32 > 0) {\\n x >>= 32;\\n result <<= 16;\\n }\\n if (x >> 16 > 0) {\\n x >>= 16;\\n result <<= 8;\\n }\\n if (x >> 8 > 0) {\\n x >>= 8;\\n result <<= 4;\\n }\\n if (x >> 4 > 0) {\\n x >>= 4;\\n result <<= 2;\\n }\\n if (x >> 2 > 0) {\\n result <<= 1;\\n }\\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 uint256 result = sqrt(a);\\n if (rounding == Rounding.Up && result * result < a) {\\n result += 1;\\n }\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xd15c3e400531f00203839159b2b8e7209c5158b35618f570c695b7e47f12e9f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted 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) {\\n require(value >= type(int248).min && value <= type(int248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return int248(value);\\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) {\\n require(value >= type(int240).min && value <= type(int240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return int240(value);\\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) {\\n require(value >= type(int232).min && value <= type(int232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return int232(value);\\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) {\\n require(value >= type(int224).min && value <= type(int224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return int224(value);\\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) {\\n require(value >= type(int216).min && value <= type(int216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return int216(value);\\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) {\\n require(value >= type(int208).min && value <= type(int208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return int208(value);\\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) {\\n require(value >= type(int200).min && value <= type(int200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return int200(value);\\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) {\\n require(value >= type(int192).min && value <= type(int192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return int192(value);\\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) {\\n require(value >= type(int184).min && value <= type(int184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return int184(value);\\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) {\\n require(value >= type(int176).min && value <= type(int176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return int176(value);\\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) {\\n require(value >= type(int168).min && value <= type(int168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return int168(value);\\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) {\\n require(value >= type(int160).min && value <= type(int160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return int160(value);\\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) {\\n require(value >= type(int152).min && value <= type(int152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return int152(value);\\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) {\\n require(value >= type(int144).min && value <= type(int144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return int144(value);\\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) {\\n require(value >= type(int136).min && value <= type(int136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return int136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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) {\\n require(value >= type(int120).min && value <= type(int120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return int120(value);\\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) {\\n require(value >= type(int112).min && value <= type(int112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return int112(value);\\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) {\\n require(value >= type(int104).min && value <= type(int104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return int104(value);\\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) {\\n require(value >= type(int96).min && value <= type(int96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return int96(value);\\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) {\\n require(value >= type(int88).min && value <= type(int88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return int88(value);\\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) {\\n require(value >= type(int80).min && value <= type(int80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return int80(value);\\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) {\\n require(value >= type(int72).min && value <= type(int72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return int72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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) {\\n require(value >= type(int56).min && value <= type(int56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return int56(value);\\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) {\\n require(value >= type(int48).min && value <= type(int48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return int48(value);\\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) {\\n require(value >= type(int40).min && value <= type(int40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return int40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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) {\\n require(value >= type(int24).min && value <= type(int24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return int24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _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\":\"0x02686c31ccb9ee77a299fa5f47327af5271f251a707a0e24f321957166ff0434\",\"license\":\"MIT\"},\"contracts/ClaimSubsidiary.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/IClaimSubsidiary.sol\\\";\\r\\nimport \\\"./VotesToken.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\r\\n\\r\\ncontract ClaimSubsidiary is Initializable, IClaimSubsidiary {\\r\\n using SafeERC20 for IERC20;\\r\\n\\r\\n address public cToken;\\r\\n address public pToken;\\r\\n uint256 public snapId;\\r\\n uint256 public pAllocation;\\r\\n mapping(address => bool) isSnapClaimed;\\r\\n\\r\\n /// @notice Initilize Claim Contract\\r\\n /// @param _metaFactory Address funding claimContract\\r\\n /// @param _pToken Address of the parent token used for snapshot reference\\r\\n /// @param _cToken Address of child Token being claimed\\r\\n /// @param _pAllocation Total tokens allocated for pToken holders\\r\\n function initialize(\\r\\n address _metaFactory,\\r\\n address _pToken,\\r\\n address _cToken,\\r\\n uint256 _pAllocation\\r\\n ) external initializer {\\r\\n cToken = _cToken;\\r\\n _createSubsidiary(_metaFactory, _pToken, _cToken, _pAllocation);\\r\\n }\\r\\n\\r\\n ////////////////////////// SnapShot //////////////////////////////////\\r\\n /// @notice This function allows pToken holders to claim cTokens\\r\\n /// @param claimer Address which is being claimed for\\r\\n function claimSnap(address claimer) external {\\r\\n uint256 amount = calculateClaimAmount(claimer); // Get user balance\\r\\n if (amount == 0) revert NoAllocation();\\r\\n isSnapClaimed[claimer] = true;\\r\\n IERC20(cToken).safeTransfer(claimer, amount); // transfer user balance\\r\\n emit SnapClaimed(pToken, cToken, claimer, amount);\\r\\n }\\r\\n\\r\\n //////////////////// View Functions //////////////////////////\\r\\n /// @notice Calculate a users cToken allocation\\r\\n /// @param claimer Address which is being claimed for\\r\\n /// @return cTokenAllocation Users cToken allocation\\r\\n function calculateClaimAmount(address claimer)\\r\\n public\\r\\n view\\r\\n returns (uint256 cTokenAllocation)\\r\\n {\\r\\n cTokenAllocation = isSnapClaimed[claimer] ? 0 :\\r\\n (VotesToken(pToken).balanceOfAt(claimer, snapId) * pAllocation) /\\r\\n VotesToken(pToken).totalSupplyAt(snapId);\\r\\n }\\r\\n\\r\\n //////////////////// Internal Functions //////////////////////////\\r\\n /// @notice This function creates a cToken and assigns a snapshot Id for pToken holder claims\\r\\n /// @param _pToken Address of the parent token used for snapshot reference\\r\\n /// @param _cToken Address of child Token being claimed\\r\\n /// @param _pAllocation Total tokens allocated for pToken holders\\r\\n /// @return _snapId snapId number\\r\\n function _createSubsidiary(\\r\\n address _metaFactory,\\r\\n address _pToken,\\r\\n address _cToken,\\r\\n uint256 _pAllocation\\r\\n ) internal returns (uint256 _snapId) {\\r\\n IERC20(_cToken).transferFrom(_metaFactory, address(this), _pAllocation);\\r\\n _snapId = VotesToken(_pToken).captureSnapShot();\\r\\n pToken = _pToken;\\r\\n snapId = _snapId;\\r\\n pAllocation = _pAllocation;\\r\\n emit SnapAdded(_pToken, _cToken, _pAllocation);\\r\\n }\\r\\n\\r\\n /// @dev This empty reserved space is put in place to allow future versions to add new\\r\\n /// variables without shifting down storage in the inheritance chain.\\r\\n /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\r\\n uint256[48] private __gap;\\r\\n}\\r\\n\",\"keccak256\":\"0x4d125bf66bdae0a780993141d15e17e5ed102e434220d26f9fb0e4a642d64469\",\"license\":\"Unlicense\"},\"contracts/VotesToken.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165Storage.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol\\\";\\r\\n\\r\\ncontract VotesToken is IERC20, ERC20Snapshot, ERC20Votes, ERC165Storage {\\r\\n constructor(\\r\\n string memory _name,\\r\\n string memory _symbol,\\r\\n address[] memory _hodlers,\\r\\n uint256[] memory _allocations\\r\\n ) ERC20(_name, _symbol) ERC20Permit(_name) {\\r\\n _registerInterface(type(IERC20).interfaceId);\\r\\n for (uint256 i = 0; i < _hodlers.length; i++) {\\r\\n _mint(_hodlers[i], _allocations[i]);\\r\\n }\\r\\n\\r\\n }\\r\\n\\r\\n function captureSnapShot() external returns (uint256 snapId) {\\r\\n snapId = _snapshot();\\r\\n }\\r\\n\\r\\n // The functions below are overrides required by Solidity.\\r\\n function _mint(address to, uint256 amount)\\r\\n internal\\r\\n virtual\\r\\n override(ERC20, ERC20Votes)\\r\\n {\\r\\n super._mint(to, amount);\\r\\n }\\r\\n\\r\\n function _burn(address account, uint256 amount)\\r\\n internal\\r\\n virtual\\r\\n override(ERC20, ERC20Votes)\\r\\n {\\r\\n super._burn(account, amount);\\r\\n }\\r\\n\\r\\n function _beforeTokenTransfer(\\r\\n address from,\\r\\n address to,\\r\\n uint256 amount\\r\\n ) internal virtual override(ERC20, ERC20Snapshot) {\\r\\n super._beforeTokenTransfer(from, to, amount);\\r\\n }\\r\\n\\r\\n function _afterTokenTransfer(\\r\\n address from,\\r\\n address to,\\r\\n uint256 amount\\r\\n ) internal virtual override(ERC20, ERC20Votes) {\\r\\n super._afterTokenTransfer(from, to, amount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x009d9f3fb78c0bfb22f440d166af3f13de0ae0ab88c98e36f840a84d1aaea7d6\",\"license\":\"Unlicense\"},\"contracts/interfaces/IClaimSubsidiary.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\ninterface IClaimSubsidiary {\\r\\n error NoAllocation();\\r\\n error AllocationClaimed();\\r\\n event SnapAdded(address pToken, address cToken, uint256 pAllocation);\\r\\n event SnapClaimed(\\r\\n address indexed pToken,\\r\\n address indexed cToken,\\r\\n address indexed claimer,\\r\\n uint256 amount\\r\\n );\\r\\n\\r\\n /// @notice Initilize Claim Contract\\r\\n /// @param _metaFactory Address funding claimContract\\r\\n /// @param _pToken Address of the parent token used for snapshot reference\\r\\n /// @param _cToken Address of child Token being claimed\\r\\n /// @param _pAllocation Total tokens allocated for pToken holders\\r\\n function initialize(\\r\\n address _metaFactory,\\r\\n address _pToken,\\r\\n address _cToken,\\r\\n uint256 _pAllocation\\r\\n ) external;\\r\\n\\r\\n /// @notice This function allows pToken holders to claim cTokens\\r\\n /// @param claimer Address which is being claimed for\\r\\n function claimSnap(address claimer) external;\\r\\n\\r\\n //////////////////// View Functions //////////////////////////\\r\\n /// @notice Calculate a users cToken allocation\\r\\n /// @param claimer Address which is being claimed for\\r\\n /// @return cTokenAllocation Users cToken allocation\\r\\n function calculateClaimAmount(address claimer)\\r\\n external\\r\\n view\\r\\n returns (uint256 cTokenAllocation);\\r\\n}\\r\\n\",\"keccak256\":\"0x877f8c6b1653fbb714237bd3df1a2f9015c6ade78c6b903b9b8f6206be1adb59\",\"license\":\"Unlicense\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50610a19806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806369e527da1161005b57806369e527da146100de57806397747728146100f7578063a40d1cbd14610100578063cf756fdf1461011357600080fd5b80634175428c14610082578063466bbe811461009757806358a06f07146100b3575b600080fd5b610095610090366004610874565b610126565b005b6100a060035481565b6040519081526020015b60405180910390f35b6001546100c6906001600160a01b031681565b6040516001600160a01b0390911681526020016100aa565b6000546100c6906201000090046001600160a01b031681565b6100a060025481565b6100a061010e366004610874565b6101e0565b61009561012136600461088f565b610313565b6000610131826101e0565b90508060000361015457604051632fc532ad60e11b815260040160405180910390fd5b6001600160a01b038083166000908152600460205260408120805460ff191660011790555461018c9162010000909104168383610454565b6000546001546040518381526001600160a01b038581169362010000900481169216907f14598a46cf7d6b47beae636c879badc9ad239ea17ee5252fe6a365694a9c35969060200160405180910390a45050565b6001600160a01b03811660009081526004602052604081205460ff1661030a57600154600254604051630981b24d60e41b81526001600160a01b039092169163981b24d0916102359160040190815260200190565b602060405180830381865afa158015610252573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027691906108da565b60035460015460025460405163277166bf60e11b81526001600160a01b0387811660048301526024820192909252911690634ee2cd7e90604401602060405180830381865afa1580156102cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f191906108da565b6102fb91906108f3565b6103059190610920565b61030d565b60005b92915050565b600054610100900460ff16158080156103335750600054600160ff909116105b8061034d5750303b15801561034d575060005460ff166001145b6103b55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156103d8576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b03861602179055610406858585856104ab565b50801561044d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104a6908490610603565b505050565b6040516323b872dd60e01b81526001600160a01b03858116600483015230602483015260448201839052600091908416906323b872dd906064016020604051808303816000875af1158015610504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105289190610942565b50836001600160a01b031663d1dc72a36040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d91906108da565b600180546001600160a01b0319166001600160a01b03878116918217909255600283905560038590556040805191825291861660208201529081018490529091507f53c4c896b07481b6e7f9a43867bc6e836fd59da1ac604caedb1c097ce8e89bd59060600160405180910390a1949350505050565b6000610658826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106d59092919063ffffffff16565b8051909150156104a657808060200190518101906106769190610942565b6104a65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103ac565b60606106e484846000856106ee565b90505b9392505050565b60608247101561074f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103ac565b6001600160a01b0385163b6107a65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103ac565b600080866001600160a01b031685876040516107c29190610994565b60006040518083038185875af1925050503d80600081146107ff576040519150601f19603f3d011682016040523d82523d6000602084013e610804565b606091505b509150915061081482828661081f565b979650505050505050565b6060831561082e5750816106e7565b82511561083e5782518084602001fd5b8160405162461bcd60e51b81526004016103ac91906109b0565b80356001600160a01b038116811461086f57600080fd5b919050565b60006020828403121561088657600080fd5b6106e782610858565b600080600080608085870312156108a557600080fd5b6108ae85610858565b93506108bc60208601610858565b92506108ca60408601610858565b9396929550929360600135925050565b6000602082840312156108ec57600080fd5b5051919050565b600081600019048311821515161561091b57634e487b7160e01b600052601160045260246000fd5b500290565b60008261093d57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561095457600080fd5b815180151581146106e757600080fd5b60005b8381101561097f578181015183820152602001610967565b8381111561098e576000848401525b50505050565b600082516109a6818460208701610964565b9190910192915050565b60208152600082518060208401526109cf816040850160208701610964565b601f01601f1916919091016040019291505056fea26469706673582212208e5f245e5c8632f310acfd6e83060cf68ca82a0949d1585774288e7712544d3864736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806369e527da1161005b57806369e527da146100de57806397747728146100f7578063a40d1cbd14610100578063cf756fdf1461011357600080fd5b80634175428c14610082578063466bbe811461009757806358a06f07146100b3575b600080fd5b610095610090366004610874565b610126565b005b6100a060035481565b6040519081526020015b60405180910390f35b6001546100c6906001600160a01b031681565b6040516001600160a01b0390911681526020016100aa565b6000546100c6906201000090046001600160a01b031681565b6100a060025481565b6100a061010e366004610874565b6101e0565b61009561012136600461088f565b610313565b6000610131826101e0565b90508060000361015457604051632fc532ad60e11b815260040160405180910390fd5b6001600160a01b038083166000908152600460205260408120805460ff191660011790555461018c9162010000909104168383610454565b6000546001546040518381526001600160a01b038581169362010000900481169216907f14598a46cf7d6b47beae636c879badc9ad239ea17ee5252fe6a365694a9c35969060200160405180910390a45050565b6001600160a01b03811660009081526004602052604081205460ff1661030a57600154600254604051630981b24d60e41b81526001600160a01b039092169163981b24d0916102359160040190815260200190565b602060405180830381865afa158015610252573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027691906108da565b60035460015460025460405163277166bf60e11b81526001600160a01b0387811660048301526024820192909252911690634ee2cd7e90604401602060405180830381865afa1580156102cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f191906108da565b6102fb91906108f3565b6103059190610920565b61030d565b60005b92915050565b600054610100900460ff16158080156103335750600054600160ff909116105b8061034d5750303b15801561034d575060005460ff166001145b6103b55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156103d8576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b03861602179055610406858585856104ab565b50801561044d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104a6908490610603565b505050565b6040516323b872dd60e01b81526001600160a01b03858116600483015230602483015260448201839052600091908416906323b872dd906064016020604051808303816000875af1158015610504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105289190610942565b50836001600160a01b031663d1dc72a36040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d91906108da565b600180546001600160a01b0319166001600160a01b03878116918217909255600283905560038590556040805191825291861660208201529081018490529091507f53c4c896b07481b6e7f9a43867bc6e836fd59da1ac604caedb1c097ce8e89bd59060600160405180910390a1949350505050565b6000610658826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106d59092919063ffffffff16565b8051909150156104a657808060200190518101906106769190610942565b6104a65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103ac565b60606106e484846000856106ee565b90505b9392505050565b60608247101561074f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103ac565b6001600160a01b0385163b6107a65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103ac565b600080866001600160a01b031685876040516107c29190610994565b60006040518083038185875af1925050503d80600081146107ff576040519150601f19603f3d011682016040523d82523d6000602084013e610804565b606091505b509150915061081482828661081f565b979650505050505050565b6060831561082e5750816106e7565b82511561083e5782518084602001fd5b8160405162461bcd60e51b81526004016103ac91906109b0565b80356001600160a01b038116811461086f57600080fd5b919050565b60006020828403121561088657600080fd5b6106e782610858565b600080600080608085870312156108a557600080fd5b6108ae85610858565b93506108bc60208601610858565b92506108ca60408601610858565b9396929550929360600135925050565b6000602082840312156108ec57600080fd5b5051919050565b600081600019048311821515161561091b57634e487b7160e01b600052601160045260246000fd5b500290565b60008261093d57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561095457600080fd5b815180151581146106e757600080fd5b60005b8381101561097f578181015183820152602001610967565b8381111561098e576000848401525b50505050565b600082516109a6818460208701610964565b9190910192915050565b60208152600082518060208401526109cf816040850160208701610964565b601f01601f1916919091016040019291505056fea26469706673582212208e5f245e5c8632f310acfd6e83060cf68ca82a0949d1585774288e7712544d3864736f6c634300080d0033", - "devdoc": { - "kind": "dev", - "methods": { - "calculateClaimAmount(address)": { - "params": { - "claimer": "Address which is being claimed for" - }, - "returns": { - "cTokenAllocation": "Users cToken allocation" - } - }, - "claimSnap(address)": { - "params": { - "claimer": "Address which is being claimed for" - } - }, - "initialize(address,address,address,uint256)": { - "params": { - "_cToken": "Address of child Token being claimed", - "_metaFactory": "Address funding claimContract", - "_pAllocation": "Total tokens allocated for pToken holders", - "_pToken": "Address of the parent token used for snapshot reference" - } - } - }, - "stateVariables": { - "__gap": { - "details": "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 https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "calculateClaimAmount(address)": { - "notice": "Calculate a users cToken allocation" - }, - "claimSnap(address)": { - "notice": "This function allows pToken holders to claim cTokens" - }, - "initialize(address,address,address,uint256)": { - "notice": "Initilize Claim Contract" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1602, - "contract": "contracts/ClaimSubsidiary.sol:ClaimSubsidiary", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 1605, - "contract": "contracts/ClaimSubsidiary.sol:ClaimSubsidiary", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 7870, - "contract": "contracts/ClaimSubsidiary.sol:ClaimSubsidiary", - "label": "cToken", - "offset": 2, - "slot": "0", - "type": "t_address" - }, - { - "astId": 7872, - "contract": "contracts/ClaimSubsidiary.sol:ClaimSubsidiary", - "label": "pToken", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 7874, - "contract": "contracts/ClaimSubsidiary.sol:ClaimSubsidiary", - "label": "snapId", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 7876, - "contract": "contracts/ClaimSubsidiary.sol:ClaimSubsidiary", - "label": "pAllocation", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 7880, - "contract": "contracts/ClaimSubsidiary.sol:ClaimSubsidiary", - "label": "isSnapClaimed", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 8039, - "contract": "contracts/ClaimSubsidiary.sol:ClaimSubsidiary", - "label": "__gap", - "offset": 0, - "slot": "5", - "type": "t_array(t_uint256)48_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint256)48_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[48]", - "numberOfBytes": "1536" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/deployments/goerli/FractalModule.json b/deployments/goerli/FractalModule.json index 3cf26d69..9a027f10 100644 --- a/deployments/goerli/FractalModule.json +++ b/deployments/goerli/FractalModule.json @@ -1,5 +1,5 @@ { - "address": "0xddb3016DdF706ed161bE9d84eeD5647b7D8f0F04", + "address": "0x260BcebDb25fa17f63972010E7b4EfC5C1D0fE0f", "abi": [ { "inputs": [ @@ -336,28 +336,28 @@ "type": "function" } ], - "transactionHash": "0x7e573dba3d6e9749a9f5ec5f2e1fc0323868a11325ca64f4bfee73cfa43f8bf2", + "transactionHash": "0x4e6150a190040daa817f2b191439280b3583d14ed1ebbe81b3e2b6dc6191dead", "receipt": { "to": null, "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", - "contractAddress": "0xddb3016DdF706ed161bE9d84eeD5647b7D8f0F04", - "transactionIndex": 28, - "gasUsed": "1001840", + "contractAddress": "0x260BcebDb25fa17f63972010E7b4EfC5C1D0fE0f", + "transactionIndex": 41, + "gasUsed": "992323", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x53669b2d5e51c90546eb7be681d17d5d057b927272715539a0784721c10e8d71", - "transactionHash": "0x7e573dba3d6e9749a9f5ec5f2e1fc0323868a11325ca64f4bfee73cfa43f8bf2", + "blockHash": "0x3a789358d8927c5d5e13b47bf6c6625d67e03df2aa63c5e864bf7c087e374ede", + "transactionHash": "0x4e6150a190040daa817f2b191439280b3583d14ed1ebbe81b3e2b6dc6191dead", "logs": [], - "blockNumber": 7752439, - "cumulativeGasUsed": "2932450", + "blockNumber": 7804423, + "cumulativeGasUsed": "14986430", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "45f7710f616c39a15b2c4779b7f6d0c2", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guard_\",\"type\":\"address\"}],\"name\":\"NotIERC165Compliant\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAvatar\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAvatar\",\"type\":\"address\"}],\"name\":\"AvatarSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guard\",\"type\":\"address\"}],\"name\":\"ChangedGuard\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"controllers\",\"type\":\"address[]\"}],\"name\":\"ControllersAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"controllers\",\"type\":\"address[]\"}],\"name\":\"ControllersRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousTarget\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTarget\",\"type\":\"address\"}],\"name\":\"TargetSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_controllers\",\"type\":\"address[]\"}],\"name\":\"addControllers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"avatar\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"controllers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"execTxData\",\"type\":\"bytes\"}],\"name\":\"execTx\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGuard\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_guard\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guard\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_controllers\",\"type\":\"address[]\"}],\"name\":\"removeControllers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"}],\"name\":\"setAvatar\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guard\",\"type\":\"address\"}],\"name\":\"setGuard\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"setTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addControllers(address[])\":{\"params\":{\"_controllers\":\"Addresses added to the contoller list\"}},\"execTx(bytes)\":{\"params\":{\"execTxData\":\"Data payload of module transaction.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeControllers(address[])\":{\"params\":{\"_controllers\":\"Addresses removed to the contoller list\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setAvatar(address)\":{\"details\":\"Sets the avatar to a new avatar (`newAvatar`).\"},\"setGuard(address)\":{\"details\":\"Set a guard that checks transactions before execution.\",\"params\":{\"_guard\":\"The address of the guard to be used or the 0 address to disable the guard.\"}},\"setTarget(address)\":{\"details\":\"Sets the target to a new target (`newTarget`).\"},\"setUp(bytes)\":{\"details\":\"Initialize function\",\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"supportsInterface(bytes4)\":{\"params\":{\"interfaceId\":\"An interface ID bytes4 as defined by ERC-165\"},\"returns\":{\"_0\":\"bool Indicates whether the interface is supported\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"errors\":{\"NotIERC165Compliant(address)\":[{\"notice\":\"`guard_` does not implement IERC165.\"}]},\"kind\":\"user\",\"methods\":{\"addControllers(address[])\":{\"notice\":\"Allows the module owner to add users which may exectxs\"},\"execTx(bytes)\":{\"notice\":\"Allows an authorized user to exec a Gnosis Safe tx via the module\"},\"removeControllers(address[])\":{\"notice\":\"Allows the module owner to remove users which may exectxs\"},\"setAvatar(address)\":{\"notice\":\"Can only be called by the current owner.\"},\"setTarget(address)\":{\"notice\":\"Can only be called by the current owner.\"},\"supportsInterface(bytes4)\":{\"notice\":\"Returns whether a given interface ID is supported\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/FractalModule.sol\":\"FractalModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n /// Check if a transactioon guard is enabled.\\n if (guard != address(0)) {\\n IGuard(guard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n bytes(\\\"0x\\\"),\\n msg.sender\\n );\\n }\\n success = IAvatar(target).execTransactionFromModule(\\n to,\\n value,\\n data,\\n operation\\n );\\n if (guard != address(0)) {\\n IGuard(guard).checkAfterExecution(bytes32(\\\"0x\\\"), success);\\n }\\n return success;\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n /// Check if a transactioon guard is enabled.\\n if (guard != address(0)) {\\n IGuard(guard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n bytes(\\\"0x\\\"),\\n msg.sender\\n );\\n }\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(to, value, data, operation);\\n if (guard != address(0)) {\\n IGuard(guard).checkAfterExecution(bytes32(\\\"0x\\\"), success);\\n }\\n return (success, returnData);\\n }\\n}\\n\",\"keccak256\":\"0x1b9b6f3b43db68f3c142b326544115d1b1fa1f319c980922ea0a29aa80f53664\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"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/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/FractalModule.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\r\\nimport \\\"./interfaces/IFractalModule.sol\\\";\\r\\n\\r\\ncontract FractalModule is IFractalModule, Module {\\r\\n mapping(address => bool) public controllers; // A DAO may authorize users to act on the behalf of the parent DAO.\\r\\n\\r\\n /// @dev Throws if called by any account other than the owner.\\r\\n modifier onlyAuthorized() {\\r\\n require(\\r\\n owner() == msg.sender || controllers[msg.sender],\\r\\n \\\"Not Authorized\\\"\\r\\n );\\r\\n _;\\r\\n }\\r\\n\\r\\n /// @dev Initialize function\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n __Ownable_init();\\r\\n (\\r\\n address _owner, // Controlling DAO\\r\\n address _avatar, // GSafe // Address(0) == msg.sender\\r\\n address _target, // GSafe or Modifier // Address(0) == msg.sender\\r\\n address[] memory _controllers // Authorized controllers\\r\\n ) = abi.decode(\\r\\n initializeParams,\\r\\n (address, address, address, address[])\\r\\n );\\r\\n\\r\\n setAvatar(_avatar == address(0) ? msg.sender : _avatar);\\r\\n setTarget(_target == address(0) ? msg.sender : _target);\\r\\n addControllers(_controllers);\\r\\n transferOwnership(_owner);\\r\\n }\\r\\n\\r\\n /// @notice Allows an authorized user to exec a Gnosis Safe tx via the module\\r\\n /// @param execTxData Data payload of module transaction.\\r\\n function execTx(bytes memory execTxData) public onlyAuthorized {\\r\\n (\\r\\n address _target,\\r\\n uint256 _value,\\r\\n bytes memory _data,\\r\\n Enum.Operation _operation\\r\\n ) = abi.decode(execTxData, (address, uint256, bytes, Enum.Operation));\\r\\n require(\\r\\n exec(_target, _value, _data, _operation),\\r\\n \\\"Module transaction failed\\\"\\r\\n );\\r\\n }\\r\\n\\r\\n /// @notice Allows the module owner to add users which may exectxs\\r\\n /// @param _controllers Addresses added to the contoller list\\r\\n function addControllers(address[] memory _controllers) public onlyOwner {\\r\\n uint256 controllersLength = _controllers.length;\\r\\n for (uint256 i; i < controllersLength; ) {\\r\\n controllers[_controllers[i]] = true;\\r\\n unchecked {\\r\\n ++i;\\r\\n }\\r\\n }\\r\\n emit ControllersAdded(_controllers);\\r\\n }\\r\\n\\r\\n /// @notice Allows the module owner to remove users which may exectxs\\r\\n /// @param _controllers Addresses removed to the contoller list\\r\\n function removeControllers(address[] memory _controllers)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n uint256 controllersLength = _controllers.length;\\r\\n for (uint256 i; i < controllersLength; ) {\\r\\n controllers[_controllers[i]] = false;\\r\\n unchecked {\\r\\n ++i;\\r\\n }\\r\\n }\\r\\n emit ControllersRemoved(_controllers);\\r\\n }\\r\\n\\r\\n /// @notice Returns whether a given interface ID is supported\\r\\n /// @param interfaceId An interface ID bytes4 as defined by ERC-165\\r\\n /// @return bool Indicates whether the interface is supported\\r\\n function supportsInterface(bytes4 interfaceId)\\r\\n external\\r\\n pure\\r\\n returns (bool)\\r\\n {\\r\\n return\\r\\n interfaceId == type(IFractalModule).interfaceId || // 0xe6d7a83a\\r\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x2fa477ad7ba619ff6f75d5136acbd257fccb607f7d0316d264cc33c0947939d4\",\"license\":\"Unlicense\"},\"contracts/interfaces/IFractalModule.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\r\\n\\r\\ninterface IFractalModule {\\r\\n event ControllersAdded(address[] controllers);\\r\\n event ControllersRemoved(address[] controllers);\\r\\n\\r\\n /// @notice Allows an authorized user to exec a Gnosis Safe tx via the module\\r\\n /// @param execTxData Data payload of module transaction.\\r\\n function execTx(bytes memory execTxData) external;\\r\\n\\r\\n /// @notice Allows the module owner to add users which may exectxs\\r\\n /// @param _controllers Addresses added to the contoller list\\r\\n function addControllers(address[] memory _controllers) external;\\r\\n\\r\\n /// @notice Allows the module owner to remove users which may exectxs\\r\\n /// @param _controllers Addresses removed to the contoller list\\r\\n function removeControllers(address[] memory _controllers) external;\\r\\n}\\r\\n\",\"keccak256\":\"0x01cc14a2ef3fc3f8272b86b385fa26afb5ec4570343875af60d77fbb5570394c\",\"license\":\"Unlicense\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50611129806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063a4f9edbf11610097578063da8c229e11610066578063da8c229e14610209578063db9253bb1461022c578063e19a9dd91461023f578063f2fde38b1461025257600080fd5b8063a4f9edbf146101bf578063c9106389146101d2578063d2a1ba91146101e3578063d4b83992146101f657600080fd5b8063776d1a01116100d3578063776d1a01146101755780637ceab3b1146101885780637f2d6b521461019b5780638da5cb5b146101ae57600080fd5b806301ffc9a714610105578063086cfca81461012d5780635aef7de614610142578063715018a61461016d575b600080fd5b610118610113366004610b44565b610265565b60405190151581526020015b60405180910390f35b61014061013b366004610b8a565b61029c565b005b606654610155906001600160a01b031681565b6040516001600160a01b039091168152602001610124565b6101406102f6565b610140610183366004610b8a565b61030a565b606554610155906001600160a01b031681565b6101406101a9366004610c12565b610364565b6033546001600160a01b0316610155565b6101406101cd366004610cd9565b610407565b6065546001600160a01b0316610155565b6101406101f1366004610c12565b610590565b606754610155906001600160a01b031681565b610118610217366004610b8a565b60686020526000908152604090205460ff1681565b61014061023a366004610cd9565b610627565b61014061024d366004610b8a565b61071c565b610140610260366004610b8a565b61081e565b60006001600160e01b03198216630ec3d04f60e31b148061029657506001600160e01b031982166301ffc9a760e01b145b92915050565b6102a4610897565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34290600090a35050565b6102fe610897565b61030860006108f1565b565b610312610897565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d690600090a35050565b61036c610897565b805160005b818110156103cb5760006068600085848151811061039157610391610d54565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101610371565b507fb5f92e548cdd019bd2a27508fd74c89e6c8e0f176b3c704b1cb75b465c78b308826040516103fb9190610d6a565b60405180910390a15050565b600054610100900460ff16158080156104275750600054600160ff909116105b806104415750303b158015610441575060005460ff166001145b6104a95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156104cc576000805461ff0019166101001790555b6104d4610943565b600080600080858060200190518101906104ee9190610db7565b929650909450925090506105166001600160a01b03841615610510578361029c565b3361029c565b6105346001600160a01b0383161561052e578261030a565b3361030a565b61053d81610590565b6105468461081e565b50505050801561058c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020016103fb565b5050565b610598610897565b805160005b818110156105f7576001606860008584815181106105bd576105bd610d54565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010161059d565b507f94fa36754b82a6daa4c5fdab179c4d32d1bcf70e7aaf53537e0928b9be800a91826040516103fb9190610d6a565b3361063a6033546001600160a01b031690565b6001600160a01b0316148061065e57503360009081526068602052604090205460ff165b61069b5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064016104a0565b600080600080848060200190518101906106b59190610ebd565b93509350935093506106c984848484610972565b6107155760405162461bcd60e51b815260206004820152601960248201527f4d6f64756c65207472616e73616374696f6e206661696c65640000000000000060448201526064016104a0565b5050505050565b610724610897565b6001600160a01b038116156107ca576040516301ffc9a760e01b815263736bd41d60e11b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa15801561077e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a29190610f6a565b6107ca576040516358b7533f60e11b81526001600160a01b03821660048201526024016104a0565b606580546001600160a01b0319166001600160a01b0383169081179091556040519081527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa29060200160405180910390a150565b610826610897565b6001600160a01b03811661088b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104a0565b610894816108f1565b50565b6033546001600160a01b031633146103085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a0565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661096a5760405162461bcd60e51b81526004016104a090610f8c565b610308610b14565b6065546000906001600160a01b031615610a14576065546040805180820182526002815261060f60f31b60208201529051633af85da960e11b81526001600160a01b03909216916375f0bb52916109e19189918991899189916000918291829182918291903390600401611025565b600060405180830381600087803b1580156109fb57600080fd5b505af1158015610a0f573d6000803e3d6000fd5b505050505b60675460405163468721a760e01b81526001600160a01b039091169063468721a790610a4a9088908890889088906004016110b4565b6020604051808303816000875af1158015610a69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8d9190610f6a565b6065549091506001600160a01b031615610b0c57606554604051631264e26d60e31b815261060f60f31b600482015282151560248201526001600160a01b0390911690639327136890604401600060405180830381600087803b158015610af357600080fd5b505af1158015610b07573d6000803e3d6000fd5b505050505b949350505050565b600054610100900460ff16610b3b5760405162461bcd60e51b81526004016104a090610f8c565b610308336108f1565b600060208284031215610b5657600080fd5b81356001600160e01b031981168114610b6e57600080fd5b9392505050565b6001600160a01b038116811461089457600080fd5b600060208284031215610b9c57600080fd5b8135610b6e81610b75565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610be657610be6610ba7565b604052919050565b600067ffffffffffffffff821115610c0857610c08610ba7565b5060051b60200190565b60006020808385031215610c2557600080fd5b823567ffffffffffffffff811115610c3c57600080fd5b8301601f81018513610c4d57600080fd5b8035610c60610c5b82610bee565b610bbd565b81815260059190911b82018301908381019087831115610c7f57600080fd5b928401925b82841015610ca6578335610c9781610b75565b82529284019290840190610c84565b979650505050505050565b600067ffffffffffffffff821115610ccb57610ccb610ba7565b50601f01601f191660200190565b600060208284031215610ceb57600080fd5b813567ffffffffffffffff811115610d0257600080fd5b8201601f81018413610d1357600080fd5b8035610d21610c5b82610cb1565b818152856020838501011115610d3657600080fd5b81602084016020830137600091810160200191909152949350505050565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b81811015610dab5783516001600160a01b031683529284019291840191600101610d86565b50909695505050505050565b60008060008060808587031215610dcd57600080fd5b8451610dd881610b75565b80945050602080860151610deb81610b75565b6040870151909450610dfc81610b75565b606087015190935067ffffffffffffffff811115610e1957600080fd5b8601601f81018813610e2a57600080fd5b8051610e38610c5b82610bee565b81815260059190911b8201830190838101908a831115610e5757600080fd5b928401925b82841015610e7e578351610e6f81610b75565b82529284019290840190610e5c565b979a9699509497505050505050565b60005b83811015610ea8578181015183820152602001610e90565b83811115610eb7576000848401525b50505050565b60008060008060808587031215610ed357600080fd5b8451610ede81610b75565b60208601516040870151919550935067ffffffffffffffff811115610f0257600080fd5b8501601f81018713610f1357600080fd5b8051610f21610c5b82610cb1565b818152886020838501011115610f3657600080fd5b610f47826020830160208601610e8d565b809450505050606085015160028110610f5f57600080fd5b939692955090935050565b600060208284031215610f7c57600080fd5b81518015158114610b6e57600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008151808452610fef816020860160208601610e8d565b601f01601f19169290920160200192915050565b6002811061102157634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038c81168252602082018c9052610160604083018190526000916110528483018e610fd7565b9150611061606085018d611003565b8a60808501528960a08501528860c085015280881660e08501528087166101008501528382036101208501526110978287610fd7565b925080851661014085015250509c9b505050505050505050505050565b60018060a01b03851681528360208201526080604082015260006110db6080830185610fd7565b90506110ea6060830184611003565b9594505050505056fea2646970667358221220061a621fb1ae8927ccb3cab87018e6b3d593f78c531614435cf74f6a1b8f235164736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063a4f9edbf11610097578063da8c229e11610066578063da8c229e14610209578063db9253bb1461022c578063e19a9dd91461023f578063f2fde38b1461025257600080fd5b8063a4f9edbf146101bf578063c9106389146101d2578063d2a1ba91146101e3578063d4b83992146101f657600080fd5b8063776d1a01116100d3578063776d1a01146101755780637ceab3b1146101885780637f2d6b521461019b5780638da5cb5b146101ae57600080fd5b806301ffc9a714610105578063086cfca81461012d5780635aef7de614610142578063715018a61461016d575b600080fd5b610118610113366004610b44565b610265565b60405190151581526020015b60405180910390f35b61014061013b366004610b8a565b61029c565b005b606654610155906001600160a01b031681565b6040516001600160a01b039091168152602001610124565b6101406102f6565b610140610183366004610b8a565b61030a565b606554610155906001600160a01b031681565b6101406101a9366004610c12565b610364565b6033546001600160a01b0316610155565b6101406101cd366004610cd9565b610407565b6065546001600160a01b0316610155565b6101406101f1366004610c12565b610590565b606754610155906001600160a01b031681565b610118610217366004610b8a565b60686020526000908152604090205460ff1681565b61014061023a366004610cd9565b610627565b61014061024d366004610b8a565b61071c565b610140610260366004610b8a565b61081e565b60006001600160e01b03198216630ec3d04f60e31b148061029657506001600160e01b031982166301ffc9a760e01b145b92915050565b6102a4610897565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34290600090a35050565b6102fe610897565b61030860006108f1565b565b610312610897565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d690600090a35050565b61036c610897565b805160005b818110156103cb5760006068600085848151811061039157610391610d54565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101610371565b507fb5f92e548cdd019bd2a27508fd74c89e6c8e0f176b3c704b1cb75b465c78b308826040516103fb9190610d6a565b60405180910390a15050565b600054610100900460ff16158080156104275750600054600160ff909116105b806104415750303b158015610441575060005460ff166001145b6104a95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156104cc576000805461ff0019166101001790555b6104d4610943565b600080600080858060200190518101906104ee9190610db7565b929650909450925090506105166001600160a01b03841615610510578361029c565b3361029c565b6105346001600160a01b0383161561052e578261030a565b3361030a565b61053d81610590565b6105468461081e565b50505050801561058c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020016103fb565b5050565b610598610897565b805160005b818110156105f7576001606860008584815181106105bd576105bd610d54565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010161059d565b507f94fa36754b82a6daa4c5fdab179c4d32d1bcf70e7aaf53537e0928b9be800a91826040516103fb9190610d6a565b3361063a6033546001600160a01b031690565b6001600160a01b0316148061065e57503360009081526068602052604090205460ff165b61069b5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064016104a0565b600080600080848060200190518101906106b59190610ebd565b93509350935093506106c984848484610972565b6107155760405162461bcd60e51b815260206004820152601960248201527f4d6f64756c65207472616e73616374696f6e206661696c65640000000000000060448201526064016104a0565b5050505050565b610724610897565b6001600160a01b038116156107ca576040516301ffc9a760e01b815263736bd41d60e11b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa15801561077e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a29190610f6a565b6107ca576040516358b7533f60e11b81526001600160a01b03821660048201526024016104a0565b606580546001600160a01b0319166001600160a01b0383169081179091556040519081527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa29060200160405180910390a150565b610826610897565b6001600160a01b03811661088b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104a0565b610894816108f1565b50565b6033546001600160a01b031633146103085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a0565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661096a5760405162461bcd60e51b81526004016104a090610f8c565b610308610b14565b6065546000906001600160a01b031615610a14576065546040805180820182526002815261060f60f31b60208201529051633af85da960e11b81526001600160a01b03909216916375f0bb52916109e19189918991899189916000918291829182918291903390600401611025565b600060405180830381600087803b1580156109fb57600080fd5b505af1158015610a0f573d6000803e3d6000fd5b505050505b60675460405163468721a760e01b81526001600160a01b039091169063468721a790610a4a9088908890889088906004016110b4565b6020604051808303816000875af1158015610a69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8d9190610f6a565b6065549091506001600160a01b031615610b0c57606554604051631264e26d60e31b815261060f60f31b600482015282151560248201526001600160a01b0390911690639327136890604401600060405180830381600087803b158015610af357600080fd5b505af1158015610b07573d6000803e3d6000fd5b505050505b949350505050565b600054610100900460ff16610b3b5760405162461bcd60e51b81526004016104a090610f8c565b610308336108f1565b600060208284031215610b5657600080fd5b81356001600160e01b031981168114610b6e57600080fd5b9392505050565b6001600160a01b038116811461089457600080fd5b600060208284031215610b9c57600080fd5b8135610b6e81610b75565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610be657610be6610ba7565b604052919050565b600067ffffffffffffffff821115610c0857610c08610ba7565b5060051b60200190565b60006020808385031215610c2557600080fd5b823567ffffffffffffffff811115610c3c57600080fd5b8301601f81018513610c4d57600080fd5b8035610c60610c5b82610bee565b610bbd565b81815260059190911b82018301908381019087831115610c7f57600080fd5b928401925b82841015610ca6578335610c9781610b75565b82529284019290840190610c84565b979650505050505050565b600067ffffffffffffffff821115610ccb57610ccb610ba7565b50601f01601f191660200190565b600060208284031215610ceb57600080fd5b813567ffffffffffffffff811115610d0257600080fd5b8201601f81018413610d1357600080fd5b8035610d21610c5b82610cb1565b818152856020838501011115610d3657600080fd5b81602084016020830137600091810160200191909152949350505050565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b81811015610dab5783516001600160a01b031683529284019291840191600101610d86565b50909695505050505050565b60008060008060808587031215610dcd57600080fd5b8451610dd881610b75565b80945050602080860151610deb81610b75565b6040870151909450610dfc81610b75565b606087015190935067ffffffffffffffff811115610e1957600080fd5b8601601f81018813610e2a57600080fd5b8051610e38610c5b82610bee565b81815260059190911b8201830190838101908a831115610e5757600080fd5b928401925b82841015610e7e578351610e6f81610b75565b82529284019290840190610e5c565b979a9699509497505050505050565b60005b83811015610ea8578181015183820152602001610e90565b83811115610eb7576000848401525b50505050565b60008060008060808587031215610ed357600080fd5b8451610ede81610b75565b60208601516040870151919550935067ffffffffffffffff811115610f0257600080fd5b8501601f81018713610f1357600080fd5b8051610f21610c5b82610cb1565b818152886020838501011115610f3657600080fd5b610f47826020830160208601610e8d565b809450505050606085015160028110610f5f57600080fd5b939692955090935050565b600060208284031215610f7c57600080fd5b81518015158114610b6e57600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008151808452610fef816020860160208601610e8d565b601f01601f19169290920160200192915050565b6002811061102157634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038c81168252602082018c9052610160604083018190526000916110528483018e610fd7565b9150611061606085018d611003565b8a60808501528960a08501528860c085015280881660e08501528087166101008501528382036101208501526110978287610fd7565b925080851661014085015250509c9b505050505050505050505050565b60018060a01b03851681528360208201526080604082015260006110db6080830185610fd7565b90506110ea6060830184611003565b9594505050505056fea2646970667358221220061a621fb1ae8927ccb3cab87018e6b3d593f78c531614435cf74f6a1b8f235164736f6c634300080d0033", + "solcInputHash": "b2fc18a2e663b1410a34647a57a06e84", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guard_\",\"type\":\"address\"}],\"name\":\"NotIERC165Compliant\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAvatar\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAvatar\",\"type\":\"address\"}],\"name\":\"AvatarSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guard\",\"type\":\"address\"}],\"name\":\"ChangedGuard\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"controllers\",\"type\":\"address[]\"}],\"name\":\"ControllersAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"controllers\",\"type\":\"address[]\"}],\"name\":\"ControllersRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousTarget\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTarget\",\"type\":\"address\"}],\"name\":\"TargetSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_controllers\",\"type\":\"address[]\"}],\"name\":\"addControllers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"avatar\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"controllers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"execTxData\",\"type\":\"bytes\"}],\"name\":\"execTx\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGuard\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_guard\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guard\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_controllers\",\"type\":\"address[]\"}],\"name\":\"removeControllers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"}],\"name\":\"setAvatar\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guard\",\"type\":\"address\"}],\"name\":\"setGuard\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"setTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addControllers(address[])\":{\"params\":{\"_controllers\":\"Addresses added to the contoller list\"}},\"execTx(bytes)\":{\"params\":{\"execTxData\":\"Data payload of module transaction.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeControllers(address[])\":{\"params\":{\"_controllers\":\"Addresses removed to the contoller list\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setAvatar(address)\":{\"details\":\"Sets the avatar to a new avatar (`newAvatar`).\"},\"setGuard(address)\":{\"details\":\"Set a guard that checks transactions before execution.\",\"params\":{\"_guard\":\"The address of the guard to be used or the 0 address to disable the guard.\"}},\"setTarget(address)\":{\"details\":\"Sets the target to a new target (`newTarget`).\"},\"setUp(bytes)\":{\"details\":\"Initialize function\",\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"supportsInterface(bytes4)\":{\"params\":{\"interfaceId\":\"An interface ID bytes4 as defined by ERC-165\"},\"returns\":{\"_0\":\"bool Indicates whether the interface is supported\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"errors\":{\"NotIERC165Compliant(address)\":[{\"notice\":\"`guard_` does not implement IERC165.\"}]},\"kind\":\"user\",\"methods\":{\"addControllers(address[])\":{\"notice\":\"Allows the module owner to add users which may exectxs\"},\"execTx(bytes)\":{\"notice\":\"Allows an authorized user to exec a Gnosis Safe tx via the module\"},\"removeControllers(address[])\":{\"notice\":\"Allows the module owner to remove users which may exectxs\"},\"setAvatar(address)\":{\"notice\":\"Can only be called by the current owner.\"},\"setTarget(address)\":{\"notice\":\"Can only be called by the current owner.\"},\"supportsInterface(bytes4)\":{\"notice\":\"Returns whether a given interface ID is supported\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/FractalModule.sol\":\"FractalModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n /// Check if a transactioon guard is enabled.\\n if (guard != address(0)) {\\n IGuard(guard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n bytes(\\\"0x\\\"),\\n msg.sender\\n );\\n }\\n success = IAvatar(target).execTransactionFromModule(\\n to,\\n value,\\n data,\\n operation\\n );\\n if (guard != address(0)) {\\n IGuard(guard).checkAfterExecution(bytes32(\\\"0x\\\"), success);\\n }\\n return success;\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n /// Check if a transactioon guard is enabled.\\n if (guard != address(0)) {\\n IGuard(guard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n bytes(\\\"0x\\\"),\\n msg.sender\\n );\\n }\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(to, value, data, operation);\\n if (guard != address(0)) {\\n IGuard(guard).checkAfterExecution(bytes32(\\\"0x\\\"), success);\\n }\\n return (success, returnData);\\n }\\n}\\n\",\"keccak256\":\"0x1b9b6f3b43db68f3c142b326544115d1b1fa1f319c980922ea0a29aa80f53664\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"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/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/FractalModule.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\r\\nimport \\\"./interfaces/IFractalModule.sol\\\";\\r\\n\\r\\ncontract FractalModule is IFractalModule, Module {\\r\\n mapping(address => bool) public controllers; // A DAO may authorize users to act on the behalf of the parent DAO.\\r\\n\\r\\n /// @dev Throws if called by any account other than the owner.\\r\\n modifier onlyAuthorized() {\\r\\n require(\\r\\n owner() == msg.sender || controllers[msg.sender],\\r\\n \\\"Not Authorized\\\"\\r\\n );\\r\\n _;\\r\\n }\\r\\n\\r\\n /// @dev Initialize function\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n __Ownable_init();\\r\\n (\\r\\n address _owner, // Controlling DAO\\r\\n address _avatar,\\r\\n address _target, \\r\\n address[] memory _controllers // Authorized controllers\\r\\n ) = abi.decode(\\r\\n initializeParams,\\r\\n (address, address, address, address[])\\r\\n );\\r\\n\\r\\n setAvatar(_avatar);\\r\\n setTarget(_target);\\r\\n addControllers(_controllers);\\r\\n transferOwnership(_owner);\\r\\n }\\r\\n\\r\\n /// @notice Allows an authorized user to exec a Gnosis Safe tx via the module\\r\\n /// @param execTxData Data payload of module transaction.\\r\\n function execTx(bytes memory execTxData) public onlyAuthorized {\\r\\n (\\r\\n address _target,\\r\\n uint256 _value,\\r\\n bytes memory _data,\\r\\n Enum.Operation _operation\\r\\n ) = abi.decode(execTxData, (address, uint256, bytes, Enum.Operation));\\r\\n require(\\r\\n exec(_target, _value, _data, _operation),\\r\\n \\\"Module transaction failed\\\"\\r\\n );\\r\\n }\\r\\n\\r\\n /// @notice Allows the module owner to add users which may exectxs\\r\\n /// @param _controllers Addresses added to the contoller list\\r\\n function addControllers(address[] memory _controllers) public onlyOwner {\\r\\n uint256 controllersLength = _controllers.length;\\r\\n for (uint256 i; i < controllersLength; ) {\\r\\n controllers[_controllers[i]] = true;\\r\\n unchecked {\\r\\n ++i;\\r\\n }\\r\\n }\\r\\n emit ControllersAdded(_controllers);\\r\\n }\\r\\n\\r\\n /// @notice Allows the module owner to remove users which may exectxs\\r\\n /// @param _controllers Addresses removed to the contoller list\\r\\n function removeControllers(address[] memory _controllers)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n uint256 controllersLength = _controllers.length;\\r\\n for (uint256 i; i < controllersLength; ) {\\r\\n controllers[_controllers[i]] = false;\\r\\n unchecked {\\r\\n ++i;\\r\\n }\\r\\n }\\r\\n emit ControllersRemoved(_controllers);\\r\\n }\\r\\n\\r\\n /// @notice Returns whether a given interface ID is supported\\r\\n /// @param interfaceId An interface ID bytes4 as defined by ERC-165\\r\\n /// @return bool Indicates whether the interface is supported\\r\\n function supportsInterface(bytes4 interfaceId)\\r\\n external\\r\\n pure\\r\\n returns (bool)\\r\\n {\\r\\n return\\r\\n interfaceId == type(IFractalModule).interfaceId || // 0xe6d7a83a\\r\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xca04180ab1bd7bebc1bfb43332d96ce9359c8be669880bfb479496fb14eb0dab\",\"license\":\"Unlicense\"},\"contracts/interfaces/IFractalModule.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\r\\n\\r\\ninterface IFractalModule {\\r\\n event ControllersAdded(address[] controllers);\\r\\n event ControllersRemoved(address[] controllers);\\r\\n\\r\\n /// @notice Allows an authorized user to exec a Gnosis Safe tx via the module\\r\\n /// @param execTxData Data payload of module transaction.\\r\\n function execTx(bytes memory execTxData) external;\\r\\n\\r\\n /// @notice Allows the module owner to add users which may exectxs\\r\\n /// @param _controllers Addresses added to the contoller list\\r\\n function addControllers(address[] memory _controllers) external;\\r\\n\\r\\n /// @notice Allows the module owner to remove users which may exectxs\\r\\n /// @param _controllers Addresses removed to the contoller list\\r\\n function removeControllers(address[] memory _controllers) external;\\r\\n}\\r\\n\",\"keccak256\":\"0x01cc14a2ef3fc3f8272b86b385fa26afb5ec4570343875af60d77fbb5570394c\",\"license\":\"Unlicense\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506110fd806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063a4f9edbf11610097578063da8c229e11610066578063da8c229e14610209578063db9253bb1461022c578063e19a9dd91461023f578063f2fde38b1461025257600080fd5b8063a4f9edbf146101bf578063c9106389146101d2578063d2a1ba91146101e3578063d4b83992146101f657600080fd5b8063776d1a01116100d3578063776d1a01146101755780637ceab3b1146101885780637f2d6b521461019b5780638da5cb5b146101ae57600080fd5b806301ffc9a714610105578063086cfca81461012d5780635aef7de614610142578063715018a61461016d575b600080fd5b610118610113366004610b18565b610265565b60405190151581526020015b60405180910390f35b61014061013b366004610b5e565b61029c565b005b606654610155906001600160a01b031681565b6040516001600160a01b039091168152602001610124565b6101406102f6565b610140610183366004610b5e565b61030a565b606554610155906001600160a01b031681565b6101406101a9366004610be6565b610364565b6033546001600160a01b0316610155565b6101406101cd366004610cad565b610407565b6065546001600160a01b0316610155565b6101406101f1366004610be6565b610564565b606754610155906001600160a01b031681565b610118610217366004610b5e565b60686020526000908152604090205460ff1681565b61014061023a366004610cad565b6105fb565b61014061024d366004610b5e565b6106f0565b610140610260366004610b5e565b6107f2565b60006001600160e01b03198216630ec3d04f60e31b148061029657506001600160e01b031982166301ffc9a760e01b145b92915050565b6102a461086b565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34290600090a35050565b6102fe61086b565b61030860006108c5565b565b61031261086b565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d690600090a35050565b61036c61086b565b805160005b818110156103cb5760006068600085848151811061039157610391610d28565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101610371565b507fb5f92e548cdd019bd2a27508fd74c89e6c8e0f176b3c704b1cb75b465c78b308826040516103fb9190610d3e565b60405180910390a15050565b600054610100900460ff16158080156104275750600054600160ff909116105b806104415750303b158015610441575060005460ff166001145b6104a95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156104cc576000805461ff0019166101001790555b6104d4610917565b600080600080858060200190518101906104ee9190610d8b565b93509350935093506104ff8361029c565b6105088261030a565b61051181610564565b61051a846107f2565b505050508015610560576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020016103fb565b5050565b61056c61086b565b805160005b818110156105cb5760016068600085848151811061059157610591610d28565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101610571565b507f94fa36754b82a6daa4c5fdab179c4d32d1bcf70e7aaf53537e0928b9be800a91826040516103fb9190610d3e565b3361060e6033546001600160a01b031690565b6001600160a01b0316148061063257503360009081526068602052604090205460ff165b61066f5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064016104a0565b600080600080848060200190518101906106899190610e91565b935093509350935061069d84848484610946565b6106e95760405162461bcd60e51b815260206004820152601960248201527f4d6f64756c65207472616e73616374696f6e206661696c65640000000000000060448201526064016104a0565b5050505050565b6106f861086b565b6001600160a01b0381161561079e576040516301ffc9a760e01b815263736bd41d60e11b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190610f3e565b61079e576040516358b7533f60e11b81526001600160a01b03821660048201526024016104a0565b606580546001600160a01b0319166001600160a01b0383169081179091556040519081527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa29060200160405180910390a150565b6107fa61086b565b6001600160a01b03811661085f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104a0565b610868816108c5565b50565b6033546001600160a01b031633146103085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a0565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661093e5760405162461bcd60e51b81526004016104a090610f60565b610308610ae8565b6065546000906001600160a01b0316156109e8576065546040805180820182526002815261060f60f31b60208201529051633af85da960e11b81526001600160a01b03909216916375f0bb52916109b59189918991899189916000918291829182918291903390600401610ff9565b600060405180830381600087803b1580156109cf57600080fd5b505af11580156109e3573d6000803e3d6000fd5b505050505b60675460405163468721a760e01b81526001600160a01b039091169063468721a790610a1e908890889088908890600401611088565b6020604051808303816000875af1158015610a3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a619190610f3e565b6065549091506001600160a01b031615610ae057606554604051631264e26d60e31b815261060f60f31b600482015282151560248201526001600160a01b0390911690639327136890604401600060405180830381600087803b158015610ac757600080fd5b505af1158015610adb573d6000803e3d6000fd5b505050505b949350505050565b600054610100900460ff16610b0f5760405162461bcd60e51b81526004016104a090610f60565b610308336108c5565b600060208284031215610b2a57600080fd5b81356001600160e01b031981168114610b4257600080fd5b9392505050565b6001600160a01b038116811461086857600080fd5b600060208284031215610b7057600080fd5b8135610b4281610b49565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610bba57610bba610b7b565b604052919050565b600067ffffffffffffffff821115610bdc57610bdc610b7b565b5060051b60200190565b60006020808385031215610bf957600080fd5b823567ffffffffffffffff811115610c1057600080fd5b8301601f81018513610c2157600080fd5b8035610c34610c2f82610bc2565b610b91565b81815260059190911b82018301908381019087831115610c5357600080fd5b928401925b82841015610c7a578335610c6b81610b49565b82529284019290840190610c58565b979650505050505050565b600067ffffffffffffffff821115610c9f57610c9f610b7b565b50601f01601f191660200190565b600060208284031215610cbf57600080fd5b813567ffffffffffffffff811115610cd657600080fd5b8201601f81018413610ce757600080fd5b8035610cf5610c2f82610c85565b818152856020838501011115610d0a57600080fd5b81602084016020830137600091810160200191909152949350505050565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b81811015610d7f5783516001600160a01b031683529284019291840191600101610d5a565b50909695505050505050565b60008060008060808587031215610da157600080fd5b8451610dac81610b49565b80945050602080860151610dbf81610b49565b6040870151909450610dd081610b49565b606087015190935067ffffffffffffffff811115610ded57600080fd5b8601601f81018813610dfe57600080fd5b8051610e0c610c2f82610bc2565b81815260059190911b8201830190838101908a831115610e2b57600080fd5b928401925b82841015610e52578351610e4381610b49565b82529284019290840190610e30565b979a9699509497505050505050565b60005b83811015610e7c578181015183820152602001610e64565b83811115610e8b576000848401525b50505050565b60008060008060808587031215610ea757600080fd5b8451610eb281610b49565b60208601516040870151919550935067ffffffffffffffff811115610ed657600080fd5b8501601f81018713610ee757600080fd5b8051610ef5610c2f82610c85565b818152886020838501011115610f0a57600080fd5b610f1b826020830160208601610e61565b809450505050606085015160028110610f3357600080fd5b939692955090935050565b600060208284031215610f5057600080fd5b81518015158114610b4257600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008151808452610fc3816020860160208601610e61565b601f01601f19169290920160200192915050565b60028110610ff557634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038c81168252602082018c9052610160604083018190526000916110268483018e610fab565b9150611035606085018d610fd7565b8a60808501528960a08501528860c085015280881660e085015280871661010085015283820361012085015261106b8287610fab565b925080851661014085015250509c9b505050505050505050505050565b60018060a01b03851681528360208201526080604082015260006110af6080830185610fab565b90506110be6060830184610fd7565b9594505050505056fea264697066735822122008aa8635f25bf3985546d946f920a88268cf7bd79344d933bd7b8edb6c1cd10964736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063a4f9edbf11610097578063da8c229e11610066578063da8c229e14610209578063db9253bb1461022c578063e19a9dd91461023f578063f2fde38b1461025257600080fd5b8063a4f9edbf146101bf578063c9106389146101d2578063d2a1ba91146101e3578063d4b83992146101f657600080fd5b8063776d1a01116100d3578063776d1a01146101755780637ceab3b1146101885780637f2d6b521461019b5780638da5cb5b146101ae57600080fd5b806301ffc9a714610105578063086cfca81461012d5780635aef7de614610142578063715018a61461016d575b600080fd5b610118610113366004610b18565b610265565b60405190151581526020015b60405180910390f35b61014061013b366004610b5e565b61029c565b005b606654610155906001600160a01b031681565b6040516001600160a01b039091168152602001610124565b6101406102f6565b610140610183366004610b5e565b61030a565b606554610155906001600160a01b031681565b6101406101a9366004610be6565b610364565b6033546001600160a01b0316610155565b6101406101cd366004610cad565b610407565b6065546001600160a01b0316610155565b6101406101f1366004610be6565b610564565b606754610155906001600160a01b031681565b610118610217366004610b5e565b60686020526000908152604090205460ff1681565b61014061023a366004610cad565b6105fb565b61014061024d366004610b5e565b6106f0565b610140610260366004610b5e565b6107f2565b60006001600160e01b03198216630ec3d04f60e31b148061029657506001600160e01b031982166301ffc9a760e01b145b92915050565b6102a461086b565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34290600090a35050565b6102fe61086b565b61030860006108c5565b565b61031261086b565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d690600090a35050565b61036c61086b565b805160005b818110156103cb5760006068600085848151811061039157610391610d28565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101610371565b507fb5f92e548cdd019bd2a27508fd74c89e6c8e0f176b3c704b1cb75b465c78b308826040516103fb9190610d3e565b60405180910390a15050565b600054610100900460ff16158080156104275750600054600160ff909116105b806104415750303b158015610441575060005460ff166001145b6104a95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156104cc576000805461ff0019166101001790555b6104d4610917565b600080600080858060200190518101906104ee9190610d8b565b93509350935093506104ff8361029c565b6105088261030a565b61051181610564565b61051a846107f2565b505050508015610560576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020016103fb565b5050565b61056c61086b565b805160005b818110156105cb5760016068600085848151811061059157610591610d28565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101610571565b507f94fa36754b82a6daa4c5fdab179c4d32d1bcf70e7aaf53537e0928b9be800a91826040516103fb9190610d3e565b3361060e6033546001600160a01b031690565b6001600160a01b0316148061063257503360009081526068602052604090205460ff165b61066f5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064016104a0565b600080600080848060200190518101906106899190610e91565b935093509350935061069d84848484610946565b6106e95760405162461bcd60e51b815260206004820152601960248201527f4d6f64756c65207472616e73616374696f6e206661696c65640000000000000060448201526064016104a0565b5050505050565b6106f861086b565b6001600160a01b0381161561079e576040516301ffc9a760e01b815263736bd41d60e11b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190610f3e565b61079e576040516358b7533f60e11b81526001600160a01b03821660048201526024016104a0565b606580546001600160a01b0319166001600160a01b0383169081179091556040519081527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa29060200160405180910390a150565b6107fa61086b565b6001600160a01b03811661085f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104a0565b610868816108c5565b50565b6033546001600160a01b031633146103085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a0565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661093e5760405162461bcd60e51b81526004016104a090610f60565b610308610ae8565b6065546000906001600160a01b0316156109e8576065546040805180820182526002815261060f60f31b60208201529051633af85da960e11b81526001600160a01b03909216916375f0bb52916109b59189918991899189916000918291829182918291903390600401610ff9565b600060405180830381600087803b1580156109cf57600080fd5b505af11580156109e3573d6000803e3d6000fd5b505050505b60675460405163468721a760e01b81526001600160a01b039091169063468721a790610a1e908890889088908890600401611088565b6020604051808303816000875af1158015610a3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a619190610f3e565b6065549091506001600160a01b031615610ae057606554604051631264e26d60e31b815261060f60f31b600482015282151560248201526001600160a01b0390911690639327136890604401600060405180830381600087803b158015610ac757600080fd5b505af1158015610adb573d6000803e3d6000fd5b505050505b949350505050565b600054610100900460ff16610b0f5760405162461bcd60e51b81526004016104a090610f60565b610308336108c5565b600060208284031215610b2a57600080fd5b81356001600160e01b031981168114610b4257600080fd5b9392505050565b6001600160a01b038116811461086857600080fd5b600060208284031215610b7057600080fd5b8135610b4281610b49565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610bba57610bba610b7b565b604052919050565b600067ffffffffffffffff821115610bdc57610bdc610b7b565b5060051b60200190565b60006020808385031215610bf957600080fd5b823567ffffffffffffffff811115610c1057600080fd5b8301601f81018513610c2157600080fd5b8035610c34610c2f82610bc2565b610b91565b81815260059190911b82018301908381019087831115610c5357600080fd5b928401925b82841015610c7a578335610c6b81610b49565b82529284019290840190610c58565b979650505050505050565b600067ffffffffffffffff821115610c9f57610c9f610b7b565b50601f01601f191660200190565b600060208284031215610cbf57600080fd5b813567ffffffffffffffff811115610cd657600080fd5b8201601f81018413610ce757600080fd5b8035610cf5610c2f82610c85565b818152856020838501011115610d0a57600080fd5b81602084016020830137600091810160200191909152949350505050565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b81811015610d7f5783516001600160a01b031683529284019291840191600101610d5a565b50909695505050505050565b60008060008060808587031215610da157600080fd5b8451610dac81610b49565b80945050602080860151610dbf81610b49565b6040870151909450610dd081610b49565b606087015190935067ffffffffffffffff811115610ded57600080fd5b8601601f81018813610dfe57600080fd5b8051610e0c610c2f82610bc2565b81815260059190911b8201830190838101908a831115610e2b57600080fd5b928401925b82841015610e52578351610e4381610b49565b82529284019290840190610e30565b979a9699509497505050505050565b60005b83811015610e7c578181015183820152602001610e64565b83811115610e8b576000848401525b50505050565b60008060008060808587031215610ea757600080fd5b8451610eb281610b49565b60208601516040870151919550935067ffffffffffffffff811115610ed657600080fd5b8501601f81018713610ee757600080fd5b8051610ef5610c2f82610c85565b818152886020838501011115610f0a57600080fd5b610f1b826020830160208601610e61565b809450505050606085015160028110610f3357600080fd5b939692955090935050565b600060208284031215610f5057600080fd5b81518015158114610b4257600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008151808452610fc3816020860160208601610e61565b601f01601f19169290920160200192915050565b60028110610ff557634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038c81168252602082018c9052610160604083018190526000916110268483018e610fab565b9150611035606085018d610fd7565b8a60808501528960a08501528860c085015280881660e085015280871661010085015283820361012085015261106b8287610fab565b925080851661014085015250509c9b505050505050505050505050565b60018060a01b03851681528360208201526080604082015260006110af6080830185610fab565b90506110be6060830184610fd7565b9594505050505056fea264697066735822122008aa8635f25bf3985546d946f920a88268cf7bd79344d933bd7b8edb6c1cd10964736f6c634300080d0033", "devdoc": { "kind": "dev", "methods": { @@ -448,7 +448,7 @@ "storageLayout": { "storage": [ { - "astId": 661, + "astId": 3006, "contract": "contracts/FractalModule.sol:FractalModule", "label": "_initialized", "offset": 0, @@ -456,7 +456,7 @@ "type": "t_uint8" }, { - "astId": 664, + "astId": 3009, "contract": "contracts/FractalModule.sol:FractalModule", "label": "_initializing", "offset": 1, @@ -464,7 +464,7 @@ "type": "t_bool" }, { - "astId": 1089, + "astId": 5465, "contract": "contracts/FractalModule.sol:FractalModule", "label": "__gap", "offset": 0, @@ -472,7 +472,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 533, + "astId": 2800, "contract": "contracts/FractalModule.sol:FractalModule", "label": "_owner", "offset": 0, @@ -480,7 +480,7 @@ "type": "t_address" }, { - "astId": 653, + "astId": 2920, "contract": "contracts/FractalModule.sol:FractalModule", "label": "__gap", "offset": 0, @@ -488,7 +488,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 340, + "astId": 2607, "contract": "contracts/FractalModule.sol:FractalModule", "label": "guard", "offset": 0, @@ -496,7 +496,7 @@ "type": "t_address" }, { - "astId": 18, + "astId": 2285, "contract": "contracts/FractalModule.sol:FractalModule", "label": "avatar", "offset": 0, @@ -504,7 +504,7 @@ "type": "t_address" }, { - "astId": 21, + "astId": 2288, "contract": "contracts/FractalModule.sol:FractalModule", "label": "target", "offset": 0, @@ -512,7 +512,7 @@ "type": "t_address" }, { - "astId": 8116, + "astId": 9590, "contract": "contracts/FractalModule.sol:FractalModule", "label": "controllers", "offset": 0, diff --git a/deployments/goerli/FractalNameRegistry.json b/deployments/goerli/FractalNameRegistry.json index 2acbdff0..c3ca3777 100644 --- a/deployments/goerli/FractalNameRegistry.json +++ b/deployments/goerli/FractalNameRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x6b45f7081E2144A442a400E81d4c5593c13c3700", + "address": "0x14d56CE23F76921203b1a092744A067D7d8963c2", "abi": [ { "anonymous": false, @@ -34,19 +34,19 @@ "type": "function" } ], - "transactionHash": "0xe500cf5a5a78eb3b80eb2f6e341a9097db48d890ceacbf0720fbdc6d734cb7d8", + "transactionHash": "0xd3069d76da8f48b463d109bd4ae132d91a001790bd57d4dfe97515a75394f053", "receipt": { "to": null, "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", - "contractAddress": "0x6b45f7081E2144A442a400E81d4c5593c13c3700", - "transactionIndex": 32, + "contractAddress": "0x14d56CE23F76921203b1a092744A067D7d8963c2", + "transactionIndex": 8, "gasUsed": "155809", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd104bdb3c631528441ab383a5c751156527002a0b249876c41b4cb5058f96a9e", - "transactionHash": "0xe500cf5a5a78eb3b80eb2f6e341a9097db48d890ceacbf0720fbdc6d734cb7d8", + "blockHash": "0xb7f058285951a196dfb4e3768787e8952bfec4b62b6f08d2cde69323ae73773a", + "transactionHash": "0xd3069d76da8f48b463d109bd4ae132d91a001790bd57d4dfe97515a75394f053", "logs": [], - "blockNumber": 7752441, - "cumulativeGasUsed": "28557101", + "blockNumber": 7804425, + "cumulativeGasUsed": "2088334", "status": 1, "byzantium": true }, diff --git a/deployments/goerli/TokenClaim.json b/deployments/goerli/TokenClaim.json new file mode 100644 index 00000000..02b5503e --- /dev/null +++ b/deployments/goerli/TokenClaim.json @@ -0,0 +1,453 @@ +{ + "address": "0x423c9E9bdFD96b50a9D203d0512526458aEC7281", + "abi": [ + { + "inputs": [], + "name": "AllocationClaimed", + "type": "error" + }, + { + "inputs": [], + "name": "NoAllocation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "parentToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "childToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "parentAllocation", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "TokenClaimCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "cToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenClaimed", + "type": "event" + }, + { + "inputs": [], + "name": "childToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "claimer", + "type": "address" + } + ], + "name": "claimToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "claimed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "claimer", + "type": "address" + } + ], + "name": "getClaimAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parentAllocation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parentToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "snapShotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x6da523fe5169c92195c16dfb8c4ceef2e1114de8e75df60ca686e11d878403b2", + "receipt": { + "to": null, + "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", + "contractAddress": "0x423c9E9bdFD96b50a9D203d0512526458aEC7281", + "transactionIndex": 109, + "gasUsed": "788459", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1cf5409b30aafd2174f5c1b7891ff74e27de104e5085a4ea3de4a42d13653313", + "transactionHash": "0x6da523fe5169c92195c16dfb8c4ceef2e1114de8e75df60ca686e11d878403b2", + "logs": [], + "blockNumber": 7804421, + "cumulativeGasUsed": "26995450", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b2fc18a2e663b1410a34647a57a06e84", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AllocationClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoAllocation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"parentToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"childToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"parentAllocation\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"TokenClaimCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"cToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"childToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"}],\"name\":\"claimToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"claimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"}],\"name\":\"getClaimAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parentAllocation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parentToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapShotId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"claimToken(address)\":{\"params\":{\"claimer\":\"Address which is being claimed for\"}},\"getClaimAmount(address)\":{\"params\":{\"claimer\":\"Address which is being claimed for\"},\"returns\":{\"_0\":\"cTokenAllocation Users cToken allocation\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"claimToken(address)\":{\"notice\":\"This function allows pToken holders to claim cTokens\"},\"getClaimAmount(address)\":{\"notice\":\"Gets a users child token claimable amount\"},\"setUp(bytes)\":{\"notice\":\"Initialize function, will be triggered when a new proxy is deployed\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TokenClaim.sol\":\"TokenClaim\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 the end of a past block (`blockNumber`).\\n */\\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\\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 blockNumber) 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(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0xe8e2d2f70db1913260634f710cc057d669b06eccf4dca27e18b79c3bbb101da6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n }\\n _balances[to] += amount;\\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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x7c7ac0bc6c340a7f320524b9a4b4b079ee9da3c51258080d4bab237f329a427c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ArraysUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\\n * total supply at the time are recorded for later access.\\n *\\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\\n * In naive implementations it's possible to perform a \\\"double spend\\\" attack by reusing the same balance from different\\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\\n * used to create an efficient ERC20 forking mechanism.\\n *\\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\\n * and the account address.\\n *\\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\\n *\\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\\n * alternative consider {ERC20Votes}.\\n *\\n * ==== Gas Costs\\n *\\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\\n *\\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\\n * transfers will have normal cost until the next snapshot, and so on.\\n */\\n\\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\\n function __ERC20Snapshot_init() internal onlyInitializing {\\n }\\n\\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\\n }\\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\\n\\n using ArraysUpgradeable for uint256[];\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\\n // Snapshot struct, but that would impede usage of functions that work on an array.\\n struct Snapshots {\\n uint256[] ids;\\n uint256[] values;\\n }\\n\\n mapping(address => Snapshots) private _accountBalanceSnapshots;\\n Snapshots private _totalSupplySnapshots;\\n\\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\\n CountersUpgradeable.Counter private _currentSnapshotId;\\n\\n /**\\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\\n */\\n event Snapshot(uint256 id);\\n\\n /**\\n * @dev Creates a new snapshot and returns its snapshot id.\\n *\\n * Emits a {Snapshot} event that contains the same id.\\n *\\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\\n *\\n * [WARNING]\\n * ====\\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\\n * you must consider that it can potentially be used by attackers in two ways.\\n *\\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\\n * section above.\\n *\\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\\n * ====\\n */\\n function _snapshot() internal virtual returns (uint256) {\\n _currentSnapshotId.increment();\\n\\n uint256 currentId = _getCurrentSnapshotId();\\n emit Snapshot(currentId);\\n return currentId;\\n }\\n\\n /**\\n * @dev Get the current snapshotId\\n */\\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\\n return _currentSnapshotId.current();\\n }\\n\\n /**\\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\\n */\\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\\n\\n return snapshotted ? value : balanceOf(account);\\n }\\n\\n /**\\n * @dev Retrieves the total supply at the time `snapshotId` was created.\\n */\\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\\n\\n return snapshotted ? value : totalSupply();\\n }\\n\\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n if (from == address(0)) {\\n // mint\\n _updateAccountSnapshot(to);\\n _updateTotalSupplySnapshot();\\n } else if (to == address(0)) {\\n // burn\\n _updateAccountSnapshot(from);\\n _updateTotalSupplySnapshot();\\n } else {\\n // transfer\\n _updateAccountSnapshot(from);\\n _updateAccountSnapshot(to);\\n }\\n }\\n\\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\\n require(snapshotId > 0, \\\"ERC20Snapshot: id is 0\\\");\\n require(snapshotId <= _getCurrentSnapshotId(), \\\"ERC20Snapshot: nonexistent id\\\");\\n\\n // When a valid snapshot is queried, there are three possibilities:\\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\\n // to this id is the current one.\\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\\n // requested id, and its value is the one to return.\\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\\n // larger than the requested one.\\n //\\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\\n // exactly this.\\n\\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\\n\\n if (index == snapshots.ids.length) {\\n return (false, 0);\\n } else {\\n return (true, snapshots.values[index]);\\n }\\n }\\n\\n function _updateAccountSnapshot(address account) private {\\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\\n }\\n\\n function _updateTotalSupplySnapshot() private {\\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\\n }\\n\\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\\n uint256 currentId = _getCurrentSnapshotId();\\n if (_lastSnapshotId(snapshots.ids) < currentId) {\\n snapshots.ids.push(currentId);\\n snapshots.values.push(currentValue);\\n }\\n }\\n\\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\\n if (ids.length == 0) {\\n return 0;\\n } else {\\n return ids[ids.length - 1];\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0x42da8099f59958af496f6c8f0d9c1ce0a929151e02f877e4be23aca4cc440cbe\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/math/MathUpgradeable.sol\\\";\\nimport \\\"../../../governance/utils/IVotesUpgradeable.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, IVotesUpgradeable, ERC20PermitUpgradeable {\\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 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 return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\\n }\\n\\n /**\\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_checkpoints[account], blockNumber);\\n }\\n\\n /**\\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\\n * It is but NOT the sum of all the delegated votes!\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\\n }\\n\\n /**\\n * @dev Lookup a value in a list of (sorted) checkpoints.\\n */\\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\\n //\\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 `blockNumber`, we look in [low, mid)\\n // - If the middle checkpoint is before or equal to `blockNumber`, 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 `blockNumber`, we end up with an index that is\\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\\n // the same.\\n uint256 high = ckpts.length;\\n uint256 low = 0;\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (ckpts[mid].fromBlock > blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n return high == 0 ? 0 : ckpts[high - 1].votes;\\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 {DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) 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 {DelegateChanged} and {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(\\n address src,\\n address dst,\\n uint256 amount\\n ) 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 oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\\n newWeight = op(oldWeight, delta);\\n\\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\\n ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight);\\n } else {\\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)}));\\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 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\":\"0x440d61e36baa04fb3b2843f010fae4116f8e3b276f1f6629bd8327368e3743a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x605434219ebbe4653f703640f06969faa5a1d78f0bfef878e5ddbb1ca369ceeb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.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\":\"0x564385ebed633694decce3e13d687f3ac7e8eaef64f7a504bfb3f03ad210601f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xcc70d8e2281fb3ff69e8ab242500f10142cd0a7fa8dd9e45882be270d4d09024\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to array types.\\n */\\nlibrary ArraysUpgradeable {\\n /**\\n * @dev Searches a sorted `array` and returns the first index that contains\\n * a value greater or equal to `element`. If no such index exists (i.e. all\\n * values in the array are strictly less than `element`), the array length is\\n * returned. Time complexity O(log n).\\n *\\n * `array` is expected to be sorted in ascending order, and to contain no\\n * repeated elements.\\n */\\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\\n if (array.length == 0) {\\n return 0;\\n }\\n\\n uint256 low = 0;\\n uint256 high = array.length;\\n\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (array[mid] > element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\\n if (low > 0 && array[low - 1] == element) {\\n return low - 1;\\n } else {\\n return low;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7c78eb214065a464bc47849a116caf75cac46307e6dc80a789447dd0a13494d8\",\"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/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xea5339a7fff0ed42b45be56a88efdd0b2ddde9fa480dc99fef9a6a4c5b776863\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (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\\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 } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xbf5daf926894541a40a64b43c3746aa1940c5a1b3b8d14a06465eea72a9b90cc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xaf5a96100f421d61693605349511e43221d3c2e47d4b3efa87af2b936e2567fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. It 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 // 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)`.\\n // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.\\n // This gives `2**k < a <= 2**(k+1)` \\u2192 `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.\\n // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a\\n // good first aproximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1;\\n uint256 x = a;\\n if (x >> 128 > 0) {\\n x >>= 128;\\n result <<= 64;\\n }\\n if (x >> 64 > 0) {\\n x >>= 64;\\n result <<= 32;\\n }\\n if (x >> 32 > 0) {\\n x >>= 32;\\n result <<= 16;\\n }\\n if (x >> 16 > 0) {\\n x >>= 16;\\n result <<= 8;\\n }\\n if (x >> 8 > 0) {\\n x >>= 8;\\n result <<= 4;\\n }\\n if (x >> 4 > 0) {\\n x >>= 4;\\n result <<= 2;\\n }\\n if (x >> 2 > 0) {\\n result <<= 1;\\n }\\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 uint256 result = sqrt(a);\\n if (rounding == Rounding.Up && result * result < a) {\\n result += 1;\\n }\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x3b39e1a87bb94b9145d91007bbd2c964438e99a659b4accc6ec6df6a1c62589a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)\\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) {\\n require(value >= type(int248).min && value <= type(int248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return int248(value);\\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) {\\n require(value >= type(int240).min && value <= type(int240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return int240(value);\\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) {\\n require(value >= type(int232).min && value <= type(int232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return int232(value);\\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) {\\n require(value >= type(int224).min && value <= type(int224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return int224(value);\\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) {\\n require(value >= type(int216).min && value <= type(int216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return int216(value);\\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) {\\n require(value >= type(int208).min && value <= type(int208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return int208(value);\\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) {\\n require(value >= type(int200).min && value <= type(int200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return int200(value);\\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) {\\n require(value >= type(int192).min && value <= type(int192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return int192(value);\\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) {\\n require(value >= type(int184).min && value <= type(int184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return int184(value);\\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) {\\n require(value >= type(int176).min && value <= type(int176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return int176(value);\\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) {\\n require(value >= type(int168).min && value <= type(int168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return int168(value);\\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) {\\n require(value >= type(int160).min && value <= type(int160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return int160(value);\\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) {\\n require(value >= type(int152).min && value <= type(int152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return int152(value);\\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) {\\n require(value >= type(int144).min && value <= type(int144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return int144(value);\\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) {\\n require(value >= type(int136).min && value <= type(int136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return int136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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) {\\n require(value >= type(int120).min && value <= type(int120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return int120(value);\\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) {\\n require(value >= type(int112).min && value <= type(int112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return int112(value);\\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) {\\n require(value >= type(int104).min && value <= type(int104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return int104(value);\\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) {\\n require(value >= type(int96).min && value <= type(int96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return int96(value);\\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) {\\n require(value >= type(int88).min && value <= type(int88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return int88(value);\\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) {\\n require(value >= type(int80).min && value <= type(int80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return int80(value);\\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) {\\n require(value >= type(int72).min && value <= type(int72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return int72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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) {\\n require(value >= type(int56).min && value <= type(int56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return int56(value);\\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) {\\n require(value >= type(int48).min && value <= type(int48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return int48(value);\\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) {\\n require(value >= type(int40).min && value <= type(int40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return int40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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) {\\n require(value >= type(int24).min && value <= type(int24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return int24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _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\":\"0xd7ebe0f80affaa622b9efd95cc8db3e03e70d699176f7457b4a95e34a11f9834\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\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\":\"0xf41ca991f30855bf80ffd11e9347856a517b977f0a6c2d52e6421a99b7840329\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/draft-IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) 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(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) 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 function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n function safePermit(\\n IERC20Permit 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(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x032807210d1d7d218963d7355d62e021a84bf1b3339f4f50be2f63b53cccaf29\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"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/ERC165Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC165.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 ERC165Storage is ERC165 {\\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\",\"keccak256\":\"0x77bf0086774bab931413c3388d3a0f7d44cf6878965b72147f57bb0fbbf394bd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/TokenClaim.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/ITokenClaim.sol\\\";\\r\\nimport \\\"./VotesToken.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\n\\r\\ncontract TokenClaim is FactoryFriendly, ITokenClaim {\\r\\n using SafeERC20 for IERC20;\\r\\n\\r\\n address public childToken;\\r\\n address public parentToken;\\r\\n uint256 public snapShotId;\\r\\n uint256 public parentAllocation;\\r\\n mapping(address => bool) public claimed;\\r\\n\\r\\n /// @notice Initialize function, will be triggered when a new proxy is deployed\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n __Ownable_init();\\r\\n (\\r\\n address _childTokenFunder,\\r\\n address _parentToken,\\r\\n address _childToken,\\r\\n uint256 _parentAllocation\\r\\n ) = abi.decode(initializeParams, (address, address, address, uint256));\\r\\n\\r\\n childToken = _childToken;\\r\\n parentToken = _parentToken;\\r\\n parentAllocation = _parentAllocation;\\r\\n\\r\\n snapShotId = VotesToken(_parentToken).captureSnapShot();\\r\\n\\r\\n IERC20(_childToken).transferFrom(_childTokenFunder, address(this), _parentAllocation);\\r\\n\\r\\n emit TokenClaimCreated(_parentToken, _childToken, _parentAllocation, snapShotId);\\r\\n }\\r\\n\\r\\n /// @notice This function allows pToken holders to claim cTokens\\r\\n /// @param claimer Address which is being claimed for\\r\\n function claimToken(address claimer) external {\\r\\n uint256 amount = getClaimAmount(claimer); // Get user balance\\r\\n\\r\\n if (amount == 0) revert NoAllocation();\\r\\n\\r\\n claimed[claimer] = true;\\r\\n\\r\\n IERC20(childToken).safeTransfer(claimer, amount); // transfer user balance\\r\\n\\r\\n emit TokenClaimed(parentToken, childToken, claimer, amount);\\r\\n }\\r\\n\\r\\n /// @notice Gets a users child token claimable amount\\r\\n /// @param claimer Address which is being claimed for\\r\\n /// @return cTokenAllocation Users cToken allocation\\r\\n function getClaimAmount(address claimer)\\r\\n public\\r\\n view\\r\\n returns (uint256)\\r\\n {\\r\\n return claimed[claimer] ? 0 :\\r\\n (VotesToken(parentToken).balanceOfAt(claimer, snapShotId) * parentAllocation) /\\r\\n VotesToken(parentToken).totalSupplyAt(snapShotId);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xa0a3e77459dd3b73176fb28344857a7821985b7450dc5ebd2fb1100c9ffaf839\",\"license\":\"Unlicense\"},\"contracts/VotesToken.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165Storage.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\\\";\\r\\n\\r\\ncontract VotesToken is\\r\\n IERC20Upgradeable,\\r\\n ERC20SnapshotUpgradeable,\\r\\n ERC20VotesUpgradeable,\\r\\n ERC165Storage,\\r\\n FactoryFriendly\\r\\n{\\r\\n /// @notice Initialize function, will be triggered when a new proxy is deployed\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n (\\r\\n string memory _name,\\r\\n string memory _symbol,\\r\\n address[] memory _hodlers,\\r\\n uint256[] memory _allocations // Address(0) == msg.sender\\r\\n ) = abi.decode(\\r\\n initializeParams,\\r\\n (string, string, address[], uint256[])\\r\\n );\\r\\n\\r\\n __ERC20_init(_name, _symbol);\\r\\n __ERC20Permit_init(_name);\\r\\n _registerInterface(type(IERC20Upgradeable).interfaceId);\\r\\n\\r\\n for (uint256 i = 0; i < _hodlers.length; i++) {\\r\\n _mint(_hodlers[i], _allocations[i]);\\r\\n }\\r\\n }\\r\\n\\r\\n function captureSnapShot() external returns (uint256 snapId) {\\r\\n snapId = _snapshot();\\r\\n }\\r\\n\\r\\n // The functions below are overrides required by Solidity.\\r\\n function _mint(address to, uint256 amount)\\r\\n internal\\r\\n virtual\\r\\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\\r\\n {\\r\\n super._mint(to, amount);\\r\\n }\\r\\n\\r\\n function _burn(address account, uint256 amount)\\r\\n internal\\r\\n virtual\\r\\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\\r\\n {\\r\\n super._burn(account, amount);\\r\\n }\\r\\n\\r\\n function _beforeTokenTransfer(\\r\\n address from,\\r\\n address to,\\r\\n uint256 amount\\r\\n ) internal virtual override(ERC20Upgradeable, ERC20SnapshotUpgradeable) {\\r\\n super._beforeTokenTransfer(from, to, amount);\\r\\n }\\r\\n\\r\\n function _afterTokenTransfer(\\r\\n address from,\\r\\n address to,\\r\\n uint256 amount\\r\\n ) internal virtual override(ERC20Upgradeable, ERC20VotesUpgradeable) {\\r\\n super._afterTokenTransfer(from, to, amount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x6ce98c8da806aa349e6c35d73cf9dc307ad1e4651754dae29cc1403b56cd42eb\",\"license\":\"Unlicense\"},\"contracts/interfaces/ITokenClaim.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\ninterface ITokenClaim {\\r\\n error NoAllocation();\\r\\n error AllocationClaimed();\\r\\n event TokenClaimCreated(\\r\\n address parentToken,\\r\\n address childToken,\\r\\n uint256 parentAllocation,\\r\\n uint256 snapshotId\\r\\n );\\r\\n event TokenClaimed(\\r\\n address indexed pToken,\\r\\n address indexed cToken,\\r\\n address indexed claimer,\\r\\n uint256 amount\\r\\n );\\r\\n\\r\\n /// @notice This function allows pToken holders to claim cTokens\\r\\n /// @param claimer Address which is being claimed for\\r\\n function claimToken(address claimer) external;\\r\\n\\r\\n /// @notice Gets a users child token claimable amount\\r\\n /// @param claimer Address which is being claimed for\\r\\n /// @return cTokenAllocation Users cToken allocation\\r\\n function getClaimAmount(address claimer) external view returns (uint256);\\r\\n}\\r\\n\",\"keccak256\":\"0x7269f08fc4d3f324cc2859de2155e84495af658d3b2240721d64b95030ec86ab\",\"license\":\"Unlicense\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610d4d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063ac0007de11610071578063ac0007de1461011f578063c884ef8314610132578063d5a2384314610165578063dde070e81461017c578063e70e3cec1461018f578063f2fde38b1461019857600080fd5b806332f289cf146100ae578063715018a6146100c357806380a54001146100cb5780638da5cb5b146100fb578063a4f9edbf1461010c575b600080fd5b6100c16100bc366004610a8c565b6101ab565b005b6100c161025a565b6066546100de906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6033546001600160a01b03166100de565b6100c161011a366004610abf565b61026e565b6065546100de906001600160a01b031681565b610155610140366004610a8c565b60696020526000908152604090205460ff1681565b60405190151581526020016100f2565b61016e60675481565b6040519081526020016100f2565b61016e61018a366004610a8c565b610514565b61016e60685481565b6100c16101a6366004610a8c565b610647565b60006101b682610514565b9050806000036101d957604051632fc532ad60e11b815260040160405180910390fd5b6001600160a01b038083166000908152606960205260409020805460ff1916600117905560655461020c911683836106c0565b6065546066546040518381526001600160a01b038581169381169216907f917cf56f6f2280df7b3c3eb8338362e11cf2158bceec528e1172f3af2537f6239060200160405180910390a45050565b610262610717565b61026c6000610771565b565b600054610100900460ff161580801561028e5750600054600160ff909116105b806102a85750303b1580156102a8575060005460ff166001145b6103105760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff191660011790558015610333576000805461ff0019166101001790555b61033b6107c3565b600080600080858060200190518101906103559190610b70565b606580546001600160a01b038085166001600160a01b03199283161790925560668054928616929091168217905560688290556040805163d1dc72a360e01b8152905195995093975091955093509163d1dc72a39160048082019260209290919082900301816000875af11580156103d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f59190610bc3565b6067556040516323b872dd60e01b81526001600160a01b038581166004830152306024830152604482018390528316906323b872dd906064016020604051808303816000875af115801561044d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104719190610bdc565b50606754604080516001600160a01b038681168252851660208201528082018490526060810192909252517f15c1b349db6d427f1c82b23bd97a6d4b1ffbd2c92f6552486451d6437f6e19c99181900360800190a1505050508015610510576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03811660009081526069602052604081205460ff1661063e57606654606754604051630981b24d60e41b81526001600160a01b039092169163981b24d0916105699160040190815260200190565b602060405180830381865afa158015610586573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105aa9190610bc3565b60685460665460675460405163277166bf60e11b81526001600160a01b0387811660048301526024820192909252911690634ee2cd7e90604401602060405180830381865afa158015610601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106259190610bc3565b61062f9190610bfe565b6106399190610c2b565b610641565b60005b92915050565b61064f610717565b6001600160a01b0381166106b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610307565b6106bd81610771565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107129084906107f2565b505050565b6033546001600160a01b0316331461026c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610307565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166107ea5760405162461bcd60e51b815260040161030790610c4d565b61026c6108c4565b6000610847826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108f49092919063ffffffff16565b80519091501561071257808060200190518101906108659190610bdc565b6107125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610307565b600054610100900460ff166108eb5760405162461bcd60e51b815260040161030790610c4d565b61026c33610771565b6060610903848460008561090d565b90505b9392505050565b60608247101561096e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610307565b6001600160a01b0385163b6109c55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610307565b600080866001600160a01b031685876040516109e19190610cc8565b60006040518083038185875af1925050503d8060008114610a1e576040519150601f19603f3d011682016040523d82523d6000602084013e610a23565b606091505b5091509150610a33828286610a3e565b979650505050505050565b60608315610a4d575081610906565b825115610a5d5782518084602001fd5b8160405162461bcd60e51b81526004016103079190610ce4565b6001600160a01b03811681146106bd57600080fd5b600060208284031215610a9e57600080fd5b813561090681610a77565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610ad157600080fd5b813567ffffffffffffffff80821115610ae957600080fd5b818401915084601f830112610afd57600080fd5b813581811115610b0f57610b0f610aa9565b604051601f8201601f19908116603f01168101908382118183101715610b3757610b37610aa9565b81604052828152876020848701011115610b5057600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060008060808587031215610b8657600080fd5b8451610b9181610a77565b6020860151909450610ba281610a77565b6040860151909350610bb381610a77565b6060959095015193969295505050565b600060208284031215610bd557600080fd5b5051919050565b600060208284031215610bee57600080fd5b8151801515811461090657600080fd5b6000816000190483118215151615610c2657634e487b7160e01b600052601160045260246000fd5b500290565b600082610c4857634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015610cb3578181015183820152602001610c9b565b83811115610cc2576000848401525b50505050565b60008251610cda818460208701610c98565b9190910192915050565b6020815260008251806020840152610d03816040850160208701610c98565b601f01601f1916919091016040019291505056fea2646970667358221220979213eae2deec4978eca08f23ced1af305c1ddbf7fbd4ad17072719f4a36edd64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063ac0007de11610071578063ac0007de1461011f578063c884ef8314610132578063d5a2384314610165578063dde070e81461017c578063e70e3cec1461018f578063f2fde38b1461019857600080fd5b806332f289cf146100ae578063715018a6146100c357806380a54001146100cb5780638da5cb5b146100fb578063a4f9edbf1461010c575b600080fd5b6100c16100bc366004610a8c565b6101ab565b005b6100c161025a565b6066546100de906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6033546001600160a01b03166100de565b6100c161011a366004610abf565b61026e565b6065546100de906001600160a01b031681565b610155610140366004610a8c565b60696020526000908152604090205460ff1681565b60405190151581526020016100f2565b61016e60675481565b6040519081526020016100f2565b61016e61018a366004610a8c565b610514565b61016e60685481565b6100c16101a6366004610a8c565b610647565b60006101b682610514565b9050806000036101d957604051632fc532ad60e11b815260040160405180910390fd5b6001600160a01b038083166000908152606960205260409020805460ff1916600117905560655461020c911683836106c0565b6065546066546040518381526001600160a01b038581169381169216907f917cf56f6f2280df7b3c3eb8338362e11cf2158bceec528e1172f3af2537f6239060200160405180910390a45050565b610262610717565b61026c6000610771565b565b600054610100900460ff161580801561028e5750600054600160ff909116105b806102a85750303b1580156102a8575060005460ff166001145b6103105760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff191660011790558015610333576000805461ff0019166101001790555b61033b6107c3565b600080600080858060200190518101906103559190610b70565b606580546001600160a01b038085166001600160a01b03199283161790925560668054928616929091168217905560688290556040805163d1dc72a360e01b8152905195995093975091955093509163d1dc72a39160048082019260209290919082900301816000875af11580156103d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f59190610bc3565b6067556040516323b872dd60e01b81526001600160a01b038581166004830152306024830152604482018390528316906323b872dd906064016020604051808303816000875af115801561044d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104719190610bdc565b50606754604080516001600160a01b038681168252851660208201528082018490526060810192909252517f15c1b349db6d427f1c82b23bd97a6d4b1ffbd2c92f6552486451d6437f6e19c99181900360800190a1505050508015610510576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03811660009081526069602052604081205460ff1661063e57606654606754604051630981b24d60e41b81526001600160a01b039092169163981b24d0916105699160040190815260200190565b602060405180830381865afa158015610586573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105aa9190610bc3565b60685460665460675460405163277166bf60e11b81526001600160a01b0387811660048301526024820192909252911690634ee2cd7e90604401602060405180830381865afa158015610601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106259190610bc3565b61062f9190610bfe565b6106399190610c2b565b610641565b60005b92915050565b61064f610717565b6001600160a01b0381166106b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610307565b6106bd81610771565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107129084906107f2565b505050565b6033546001600160a01b0316331461026c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610307565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166107ea5760405162461bcd60e51b815260040161030790610c4d565b61026c6108c4565b6000610847826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108f49092919063ffffffff16565b80519091501561071257808060200190518101906108659190610bdc565b6107125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610307565b600054610100900460ff166108eb5760405162461bcd60e51b815260040161030790610c4d565b61026c33610771565b6060610903848460008561090d565b90505b9392505050565b60608247101561096e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610307565b6001600160a01b0385163b6109c55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610307565b600080866001600160a01b031685876040516109e19190610cc8565b60006040518083038185875af1925050503d8060008114610a1e576040519150601f19603f3d011682016040523d82523d6000602084013e610a23565b606091505b5091509150610a33828286610a3e565b979650505050505050565b60608315610a4d575081610906565b825115610a5d5782518084602001fd5b8160405162461bcd60e51b81526004016103079190610ce4565b6001600160a01b03811681146106bd57600080fd5b600060208284031215610a9e57600080fd5b813561090681610a77565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610ad157600080fd5b813567ffffffffffffffff80821115610ae957600080fd5b818401915084601f830112610afd57600080fd5b813581811115610b0f57610b0f610aa9565b604051601f8201601f19908116603f01168101908382118183101715610b3757610b37610aa9565b81604052828152876020848701011115610b5057600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060008060808587031215610b8657600080fd5b8451610b9181610a77565b6020860151909450610ba281610a77565b6040860151909350610bb381610a77565b6060959095015193969295505050565b600060208284031215610bd557600080fd5b5051919050565b600060208284031215610bee57600080fd5b8151801515811461090657600080fd5b6000816000190483118215151615610c2657634e487b7160e01b600052601160045260246000fd5b500290565b600082610c4857634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015610cb3578181015183820152602001610c9b565b83811115610cc2576000848401525b50505050565b60008251610cda818460208701610c98565b9190910192915050565b6020815260008251806020840152610d03816040850160208701610c98565b601f01601f1916919091016040019291505056fea2646970667358221220979213eae2deec4978eca08f23ced1af305c1ddbf7fbd4ad17072719f4a36edd64736f6c634300080d0033", + "devdoc": { + "kind": "dev", + "methods": { + "claimToken(address)": { + "params": { + "claimer": "Address which is being claimed for" + } + }, + "getClaimAmount(address)": { + "params": { + "claimer": "Address which is being claimed for" + }, + "returns": { + "_0": "cTokenAllocation Users cToken allocation" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setUp(bytes)": { + "params": { + "initializeParams": "Parameters of initialization encoded" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "claimToken(address)": { + "notice": "This function allows pToken holders to claim cTokens" + }, + "getClaimAmount(address)": { + "notice": "Gets a users child token claimable amount" + }, + "setUp(bytes)": { + "notice": "Initialize function, will be triggered when a new proxy is deployed" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3006, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 3009, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 5465, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2800, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 2920, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 9821, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "childToken", + "offset": 0, + "slot": "101", + "type": "t_address" + }, + { + "astId": 9823, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "parentToken", + "offset": 0, + "slot": "102", + "type": "t_address" + }, + { + "astId": 9825, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "snapShotId", + "offset": 0, + "slot": "103", + "type": "t_uint256" + }, + { + "astId": 9827, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "parentAllocation", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 9831, + "contract": "contracts/TokenClaim.sol:TokenClaim", + "label": "claimed", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_address,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/goerli/TokenFactory.json b/deployments/goerli/TokenFactory.json deleted file mode 100644 index bcac30cf..00000000 --- a/deployments/goerli/TokenFactory.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "address": "0x40F6DB8Cf8b4C37DB76474db9B4D6182da284afe", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "TokenCreated", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "creator", - "type": "address" - }, - { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" - } - ], - "name": "create", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xd77736f1a8e314468dc2fbac4bf15a22eb1307ed1d10989e082b9c8a851bd83d", - "receipt": { - "to": null, - "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", - "contractAddress": "0x40F6DB8Cf8b4C37DB76474db9B4D6182da284afe", - "transactionIndex": 2, - "gasUsed": "3147646", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0d90e691fa5718e188f8927ee56e14ff1b855e3750ee2057487992e4167b4804", - "transactionHash": "0xd77736f1a8e314468dc2fbac4bf15a22eb1307ed1d10989e082b9c8a851bd83d", - "logs": [], - "blockNumber": 7752442, - "cumulativeGasUsed": "3332199", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "45f7710f616c39a15b2c4779b7f6d0c2", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"create\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"create(address,bytes[])\":{\"details\":\"Creates an ERC-20 votes token\",\"params\":{\"creator\":\"The address creating the module\",\"data\":\"The array of bytes used to create the token\"},\"returns\":{\"_0\":\"address The address of the created token\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Token Factory used to deploy votes tokens\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TokenFactory.sol\":\"TokenFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/governance/utils/IVotes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 IVotes {\\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 the end of a past block (`blockNumber`).\\n */\\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\\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 blockNumber) 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(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0xf5324a55ee9c0b4a840ea57c055ac9d046f88986ceef567e1cf68113e46a79c0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n }\\n _balances[to] += amount;\\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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Arrays.sol\\\";\\nimport \\\"../../../utils/Counters.sol\\\";\\n\\n/**\\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\\n * total supply at the time are recorded for later access.\\n *\\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\\n * In naive implementations it's possible to perform a \\\"double spend\\\" attack by reusing the same balance from different\\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\\n * used to create an efficient ERC20 forking mechanism.\\n *\\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\\n * and the account address.\\n *\\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\\n *\\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\\n * alternative consider {ERC20Votes}.\\n *\\n * ==== Gas Costs\\n *\\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\\n *\\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\\n * transfers will have normal cost until the next snapshot, and so on.\\n */\\n\\nabstract contract ERC20Snapshot is ERC20 {\\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\\n\\n using Arrays for uint256[];\\n using Counters for Counters.Counter;\\n\\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\\n // Snapshot struct, but that would impede usage of functions that work on an array.\\n struct Snapshots {\\n uint256[] ids;\\n uint256[] values;\\n }\\n\\n mapping(address => Snapshots) private _accountBalanceSnapshots;\\n Snapshots private _totalSupplySnapshots;\\n\\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\\n Counters.Counter private _currentSnapshotId;\\n\\n /**\\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\\n */\\n event Snapshot(uint256 id);\\n\\n /**\\n * @dev Creates a new snapshot and returns its snapshot id.\\n *\\n * Emits a {Snapshot} event that contains the same id.\\n *\\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\\n *\\n * [WARNING]\\n * ====\\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\\n * you must consider that it can potentially be used by attackers in two ways.\\n *\\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\\n * section above.\\n *\\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\\n * ====\\n */\\n function _snapshot() internal virtual returns (uint256) {\\n _currentSnapshotId.increment();\\n\\n uint256 currentId = _getCurrentSnapshotId();\\n emit Snapshot(currentId);\\n return currentId;\\n }\\n\\n /**\\n * @dev Get the current snapshotId\\n */\\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\\n return _currentSnapshotId.current();\\n }\\n\\n /**\\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\\n */\\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\\n\\n return snapshotted ? value : balanceOf(account);\\n }\\n\\n /**\\n * @dev Retrieves the total supply at the time `snapshotId` was created.\\n */\\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\\n\\n return snapshotted ? value : totalSupply();\\n }\\n\\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n if (from == address(0)) {\\n // mint\\n _updateAccountSnapshot(to);\\n _updateTotalSupplySnapshot();\\n } else if (to == address(0)) {\\n // burn\\n _updateAccountSnapshot(from);\\n _updateTotalSupplySnapshot();\\n } else {\\n // transfer\\n _updateAccountSnapshot(from);\\n _updateAccountSnapshot(to);\\n }\\n }\\n\\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\\n require(snapshotId > 0, \\\"ERC20Snapshot: id is 0\\\");\\n require(snapshotId <= _getCurrentSnapshotId(), \\\"ERC20Snapshot: nonexistent id\\\");\\n\\n // When a valid snapshot is queried, there are three possibilities:\\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\\n // to this id is the current one.\\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\\n // requested id, and its value is the one to return.\\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\\n // larger than the requested one.\\n //\\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\\n // exactly this.\\n\\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\\n\\n if (index == snapshots.ids.length) {\\n return (false, 0);\\n } else {\\n return (true, snapshots.values[index]);\\n }\\n }\\n\\n function _updateAccountSnapshot(address account) private {\\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\\n }\\n\\n function _updateTotalSupplySnapshot() private {\\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\\n }\\n\\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\\n uint256 currentId = _getCurrentSnapshotId();\\n if (_lastSnapshotId(snapshots.ids) < currentId) {\\n snapshots.ids.push(currentId);\\n snapshots.values.push(currentValue);\\n }\\n }\\n\\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\\n if (ids.length == 0) {\\n return 0;\\n } else {\\n return ids[ids.length - 1];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9f3a9fc338edd87bff11d626ee6f365ac72f03a8841c4a2938438ef81e8cf1d9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-ERC20Permit.sol\\\";\\nimport \\\"../../../utils/math/Math.sol\\\";\\nimport \\\"../../../governance/utils/IVotes.sol\\\";\\nimport \\\"../../../utils/math/SafeCast.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSA.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 ERC20Votes is IVotes, ERC20Permit {\\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 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 SafeCast.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 return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\\n }\\n\\n /**\\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_checkpoints[account], blockNumber);\\n }\\n\\n /**\\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\\n * It is but NOT the sum of all the delegated votes!\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\\n }\\n\\n /**\\n * @dev Lookup a value in a list of (sorted) checkpoints.\\n */\\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\\n //\\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 `blockNumber`, we look in [low, mid)\\n // - If the middle checkpoint is before or equal to `blockNumber`, 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 `blockNumber`, we end up with an index that is\\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\\n // the same.\\n uint256 high = ckpts.length;\\n uint256 low = 0;\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n if (ckpts[mid].fromBlock > blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n return high == 0 ? 0 : ckpts[high - 1].votes;\\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 = ECDSA.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 {DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) 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 {DelegateChanged} and {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(\\n address src,\\n address dst,\\n uint256 amount\\n ) 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 oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\\n newWeight = op(oldWeight, delta);\\n\\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\\n ckpts[pos - 1].votes = SafeCast.toUint224(newWeight);\\n } else {\\n ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(block.number), votes: SafeCast.toUint224(newWeight)}));\\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\",\"keccak256\":\"0x7fd2492be0468be4662081ee25cde38a31e4a0ceca0fed10160462389013910f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20Permit.sol\\\";\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../../../utils/Counters.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 */\\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\\n using Counters for Counters.Counter;\\n\\n mapping(address => Counters.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 constructor(string memory name) EIP712(name, \\\"1\\\") {}\\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 = ECDSA.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 Counters.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n}\\n\",\"keccak256\":\"0x07536242e24ee7067295d32c08e495a33e605f3c52f8ee4ec3bdcb7a351313d2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\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\":\"0xf41ca991f30855bf80ffd11e9347856a517b977f0a6c2d52e6421a99b7840329\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Arrays.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to array types.\\n */\\nlibrary Arrays {\\n /**\\n * @dev Searches a sorted `array` and returns the first index that contains\\n * a value greater or equal to `element`. If no such index exists (i.e. all\\n * values in the array are strictly less than `element`), the array length is\\n * returned. Time complexity O(log n).\\n *\\n * `array` is expected to be sorted in ascending order, and to contain no\\n * repeated elements.\\n */\\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\\n if (array.length == 0) {\\n return 0;\\n }\\n\\n uint256 low = 0;\\n uint256 high = array.length;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (array[mid] > element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\\n if (low > 0 && array[low - 1] == element) {\\n return low - 1;\\n } else {\\n return low;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa7bc891be2bc5948340a8fb14ad36c8846230c9086269e37f3febf0dc239c9f7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.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 Counters {\\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\":\"0xf0018c2440fbe238dd3a8732fa8e17a0f9dce84d31451dc8a32f6d62b349c9f1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Create2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Create2.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\\n * `CREATE2` can be used to compute in advance the address where a smart\\n * contract will be deployed, which allows for interesting new mechanisms known\\n * as 'counterfactual interactions'.\\n *\\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\\n * information.\\n */\\nlibrary Create2 {\\n /**\\n * @dev Deploys a contract using `CREATE2`. The address where the contract\\n * will be deployed can be known in advance via {computeAddress}.\\n *\\n * The bytecode for a contract can be obtained from Solidity with\\n * `type(contractName).creationCode`.\\n *\\n * Requirements:\\n *\\n * - `bytecode` must not be empty.\\n * - `salt` must have not been used for `bytecode` already.\\n * - the factory must have a balance of at least `amount`.\\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\\n */\\n function deploy(\\n uint256 amount,\\n bytes32 salt,\\n bytes memory bytecode\\n ) internal returns (address) {\\n address addr;\\n require(address(this).balance >= amount, \\\"Create2: insufficient balance\\\");\\n require(bytecode.length != 0, \\\"Create2: bytecode length is zero\\\");\\n /// @solidity memory-safe-assembly\\n assembly {\\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\\n }\\n require(addr != address(0), \\\"Create2: Failed on deploy\\\");\\n return addr;\\n }\\n\\n /**\\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\\n * `bytecodeHash` or `salt` will result in a new destination address.\\n */\\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\\n return computeAddress(salt, bytecodeHash, address(this));\\n }\\n\\n /**\\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\\n */\\n function computeAddress(\\n bytes32 salt,\\n bytes32 bytecodeHash,\\n address deployer\\n ) internal pure returns (address) {\\n bytes32 _data = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash));\\n return address(uint160(uint256(_data)));\\n }\\n}\\n\",\"keccak256\":\"0x62237e1773cbf99739b7019f3772a2ff5360d56edb69751b513237f5fcd78571\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.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 ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\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 } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\\n uint256 private immutable _CACHED_CHAIN_ID;\\n address private immutable _CACHED_THIS;\\n\\n bytes32 private immutable _HASHED_NAME;\\n bytes32 private immutable _HASHED_VERSION;\\n bytes32 private immutable _TYPE_HASH;\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor(string memory name, string memory version) {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n bytes32 typeHash = keccak256(\\n \\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"\\n );\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\\n _CACHED_THIS = address(this);\\n _TYPE_HASH = typeHash;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\\n return _CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0x6688fad58b9ec0286d40fa957152e575d5d8bd4c3aa80985efdb11b44f776ae7\",\"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/ERC165Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC165.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 ERC165Storage is ERC165 {\\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\",\"keccak256\":\"0x77bf0086774bab931413c3388d3a0f7d44cf6878965b72147f57bb0fbbf394bd\",\"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\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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 Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. It 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 // 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)`.\\n // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.\\n // This gives `2**k < a <= 2**(k+1)` \\u2192 `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.\\n // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a\\n // good first aproximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1;\\n uint256 x = a;\\n if (x >> 128 > 0) {\\n x >>= 128;\\n result <<= 64;\\n }\\n if (x >> 64 > 0) {\\n x >>= 64;\\n result <<= 32;\\n }\\n if (x >> 32 > 0) {\\n x >>= 32;\\n result <<= 16;\\n }\\n if (x >> 16 > 0) {\\n x >>= 16;\\n result <<= 8;\\n }\\n if (x >> 8 > 0) {\\n x >>= 8;\\n result <<= 4;\\n }\\n if (x >> 4 > 0) {\\n x >>= 4;\\n result <<= 2;\\n }\\n if (x >> 2 > 0) {\\n result <<= 1;\\n }\\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 uint256 result = sqrt(a);\\n if (rounding == Rounding.Up && result * result < a) {\\n result += 1;\\n }\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xd15c3e400531f00203839159b2b8e7209c5158b35618f570c695b7e47f12e9f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted 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) {\\n require(value >= type(int248).min && value <= type(int248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return int248(value);\\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) {\\n require(value >= type(int240).min && value <= type(int240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return int240(value);\\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) {\\n require(value >= type(int232).min && value <= type(int232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return int232(value);\\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) {\\n require(value >= type(int224).min && value <= type(int224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return int224(value);\\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) {\\n require(value >= type(int216).min && value <= type(int216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return int216(value);\\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) {\\n require(value >= type(int208).min && value <= type(int208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return int208(value);\\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) {\\n require(value >= type(int200).min && value <= type(int200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return int200(value);\\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) {\\n require(value >= type(int192).min && value <= type(int192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return int192(value);\\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) {\\n require(value >= type(int184).min && value <= type(int184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return int184(value);\\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) {\\n require(value >= type(int176).min && value <= type(int176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return int176(value);\\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) {\\n require(value >= type(int168).min && value <= type(int168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return int168(value);\\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) {\\n require(value >= type(int160).min && value <= type(int160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return int160(value);\\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) {\\n require(value >= type(int152).min && value <= type(int152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return int152(value);\\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) {\\n require(value >= type(int144).min && value <= type(int144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return int144(value);\\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) {\\n require(value >= type(int136).min && value <= type(int136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return int136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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) {\\n require(value >= type(int120).min && value <= type(int120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return int120(value);\\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) {\\n require(value >= type(int112).min && value <= type(int112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return int112(value);\\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) {\\n require(value >= type(int104).min && value <= type(int104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return int104(value);\\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) {\\n require(value >= type(int96).min && value <= type(int96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return int96(value);\\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) {\\n require(value >= type(int88).min && value <= type(int88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return int88(value);\\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) {\\n require(value >= type(int80).min && value <= type(int80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return int80(value);\\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) {\\n require(value >= type(int72).min && value <= type(int72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return int72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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) {\\n require(value >= type(int56).min && value <= type(int56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return int56(value);\\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) {\\n require(value >= type(int48).min && value <= type(int48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return int48(value);\\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) {\\n require(value >= type(int40).min && value <= type(int40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return int40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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) {\\n require(value >= type(int24).min && value <= type(int24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return int24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _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\":\"0x02686c31ccb9ee77a299fa5f47327af5271f251a707a0e24f321957166ff0434\",\"license\":\"MIT\"},\"contracts/TokenFactory.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/ITokenFactory.sol\\\";\\r\\nimport \\\"./VotesToken.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/Create2.sol\\\";\\r\\n\\r\\n/// @notice Token Factory used to deploy votes tokens\\r\\ncontract TokenFactory is ITokenFactory {\\r\\n /// @dev Creates an ERC-20 votes token\\r\\n /// @param creator The address creating the module\\r\\n /// @param data The array of bytes used to create the token\\r\\n /// @return address The address of the created token\\r\\n function create(address creator, bytes[] calldata data)\\r\\n external\\r\\n override\\r\\n returns (address[] memory)\\r\\n {\\r\\n address[] memory createdContracts = new address[](1);\\r\\n\\r\\n createdContracts[0] = _createToken(\\r\\n creator,\\r\\n abi.decode(data[4], (bytes32)),\\r\\n abi.decode(data[0], (string)),\\r\\n abi.decode(data[1], (string)),\\r\\n abi.decode(data[2], (address[])),\\r\\n abi.decode(data[3], (uint256[]))\\r\\n );\\r\\n\\r\\n return createdContracts;\\r\\n }\\r\\n\\r\\n function _createToken(\\r\\n address creator,\\r\\n bytes32 salt,\\r\\n string memory name,\\r\\n string memory symbol,\\r\\n address[] memory _hodlers,\\r\\n uint256[] memory _allocations\\r\\n ) internal returns (address createdToken) {\\r\\n createdToken = Create2.deploy(\\r\\n 0,\\r\\n keccak256(\\r\\n abi.encodePacked(creator, msg.sender, block.chainid, salt)\\r\\n ),\\r\\n abi.encodePacked(\\r\\n type(VotesToken).creationCode,\\r\\n abi.encode(name, symbol, _hodlers, _allocations)\\r\\n )\\r\\n );\\r\\n emit TokenCreated(createdToken);\\r\\n return createdToken;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x8417f450d5dec8d1589d1a8ef551a397f48ba27db5b35c3146830ac91279f3b1\",\"license\":\"Unlicense\"},\"contracts/VotesToken.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165Storage.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol\\\";\\r\\n\\r\\ncontract VotesToken is IERC20, ERC20Snapshot, ERC20Votes, ERC165Storage {\\r\\n constructor(\\r\\n string memory _name,\\r\\n string memory _symbol,\\r\\n address[] memory _hodlers,\\r\\n uint256[] memory _allocations\\r\\n ) ERC20(_name, _symbol) ERC20Permit(_name) {\\r\\n _registerInterface(type(IERC20).interfaceId);\\r\\n for (uint256 i = 0; i < _hodlers.length; i++) {\\r\\n _mint(_hodlers[i], _allocations[i]);\\r\\n }\\r\\n\\r\\n }\\r\\n\\r\\n function captureSnapShot() external returns (uint256 snapId) {\\r\\n snapId = _snapshot();\\r\\n }\\r\\n\\r\\n // The functions below are overrides required by Solidity.\\r\\n function _mint(address to, uint256 amount)\\r\\n internal\\r\\n virtual\\r\\n override(ERC20, ERC20Votes)\\r\\n {\\r\\n super._mint(to, amount);\\r\\n }\\r\\n\\r\\n function _burn(address account, uint256 amount)\\r\\n internal\\r\\n virtual\\r\\n override(ERC20, ERC20Votes)\\r\\n {\\r\\n super._burn(account, amount);\\r\\n }\\r\\n\\r\\n function _beforeTokenTransfer(\\r\\n address from,\\r\\n address to,\\r\\n uint256 amount\\r\\n ) internal virtual override(ERC20, ERC20Snapshot) {\\r\\n super._beforeTokenTransfer(from, to, amount);\\r\\n }\\r\\n\\r\\n function _afterTokenTransfer(\\r\\n address from,\\r\\n address to,\\r\\n uint256 amount\\r\\n ) internal virtual override(ERC20, ERC20Votes) {\\r\\n super._afterTokenTransfer(from, to, amount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x009d9f3fb78c0bfb22f440d166af3f13de0ae0ab88c98e36f840a84d1aaea7d6\",\"license\":\"Unlicense\"},\"contracts/interfaces/ITokenFactory.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\ninterface ITokenFactory {\\r\\n event TokenCreated(address indexed tokenAddress);\\r\\n\\r\\n /// @dev Creates a module\\r\\n /// @param creator The address creating the module\\r\\n /// @param data The array of bytes used to create the module\\r\\n /// @return address[] Array of the created module addresses\\r\\n function create(address creator, bytes[] calldata data) external returns (address[] memory);\\r\\n}\",\"keccak256\":\"0xcc25a3c5ea6dc5664e94337f997d168837002f2767cf945d83d69bd3a79648b7\",\"license\":\"Unlicense\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061381b806100206000396000f3fe60806040523480156200001157600080fd5b50600436106200002e5760003560e01c80636d81fc721462000033575b600080fd5b6200004a6200004436600462000432565b62000062565b60405162000059919062000505565b60405180910390f35b6040805160018082528183019092526060916000919060208083019080368337019050509050620001b08585856004818110620000a357620000a362000537565b9050602002810190620000b791906200054d565b810190620000c691906200059e565b86866000818110620000dc57620000dc62000537565b9050602002810190620000f091906200054d565b810190620000ff9190620005ec565b8787600181811062000115576200011562000537565b90506020028101906200012991906200054d565b810190620001389190620005ec565b888860028181106200014e576200014e62000537565b90506020028101906200016291906200054d565b810190620001719190620006b1565b8989600381811062000187576200018762000537565b90506020028101906200019b91906200054d565b810190620001aa91906200075a565b620001e7565b81600081518110620001c657620001c662000537565b6001600160a01b039092166020928302919091019091015290509392505050565b6040516bffffffffffffffffffffffff19606088811b8216602084015233901b16603482015246604882015260688101869052600090620002af90829060880160405160208183030381529060405280519060200120604051806020016200024f9062000407565b601f1982820381018352601f9091011660408190526200027a908a908a908a908a906020016200084a565b60408051601f19818403018152908290526200029a9291602001620008d0565b604051602081830303815290604052620002f0565b6040519091506001600160a01b038216907f2e2b3f61b70d2d131b2a807371103cc98d51adcaa5e9a8f9c32658ad8426e74e90600090a29695505050505050565b60008084471015620003495760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b82516000036200039c5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604482015260640162000340565b8383516020850187f590506001600160a01b038116620003ff5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f7900000000000000604482015260640162000340565b949350505050565b612ee2806200090483390190565b80356001600160a01b03811681146200042d57600080fd5b919050565b6000806000604084860312156200044857600080fd5b620004538462000415565b9250602084013567ffffffffffffffff808211156200047157600080fd5b818601915086601f8301126200048657600080fd5b8135818111156200049657600080fd5b8760208260051b8501011115620004ac57600080fd5b6020830194508093505050509250925092565b600081518084526020808501945080840160005b83811015620004fa5781516001600160a01b031687529582019590820190600101620004d3565b509495945050505050565b6020815260006200051a6020830184620004bf565b9392505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126200056557600080fd5b83018035915067ffffffffffffffff8211156200058157600080fd5b6020019150368190038213156200059757600080fd5b9250929050565b600060208284031215620005b157600080fd5b5035919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715620005e457620005e462000521565b604052919050565b600060208083850312156200060057600080fd5b823567ffffffffffffffff808211156200061957600080fd5b818501915085601f8301126200062e57600080fd5b81358181111562000643576200064362000521565b62000657601f8201601f19168501620005b8565b915080825286848285010111156200066e57600080fd5b8084840185840137600090820190930192909252509392505050565b600067ffffffffffffffff821115620006a757620006a762000521565b5060051b60200190565b60006020808385031215620006c557600080fd5b823567ffffffffffffffff811115620006dd57600080fd5b8301601f81018513620006ef57600080fd5b80356200070662000700826200068a565b620005b8565b81815260059190911b820183019083810190878311156200072657600080fd5b928401925b828410156200074f576200073f8462000415565b825292840192908401906200072b565b979650505050505050565b600060208083850312156200076e57600080fd5b823567ffffffffffffffff8111156200078657600080fd5b8301601f810185136200079857600080fd5b8035620007a962000700826200068a565b81815260059190911b82018301908381019087831115620007c957600080fd5b928401925b828410156200074f57833582529284019290840190620007ce565b60005b8381101562000806578181015183820152602001620007ec565b8381111562000816576000848401525b50505050565b6000815180845262000836816020860160208601620007e9565b601f01601f19169290920160200192915050565b6080815260006200085f60808301876200081c565b6020838203818501526200087482886200081c565b915083820360408501526200088a8287620004bf565b8481036060860152855180825282870193509082019060005b81811015620008c157845183529383019391830191600101620008a3565b50909998505050505050505050565b60008351620008e4818460208801620007e9565b835190830190620008fa818360208801620007e9565b0194935050505056fe6101406040523480156200001257600080fd5b5060405162002ee238038062002ee2833981016040819052620000359162000be0565b8380604051806040016040528060018152602001603160f81b815250868681600390805190602001906200006b929190620009cd565b50805162000081906004906020840190620009cd565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c09485019091528151919096012090529290925261012052506200012790506336372b0760e01b6200019e565b60005b825181101562000193576200017e8382815181106200014d576200014d62000d09565b60200260200101518383815181106200016a576200016a62000d09565b60200260200101516200022360201b60201c565b806200018a8162000d35565b9150506200012a565b505050505062000dc2565b6001600160e01b03198082169003620001fe5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064015b60405180910390fd5b6001600160e01b0319166000908152600e60205260409020805460ff19166001179055565b6200023a82826200023e60201b62000b571760201c565b5050565b620002558282620002f160201b62000be71760201c565b6001600160e01b0362000269620003ee8216565b1115620002d25760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401620001f5565b620002eb600d62000cde620003f460201b178362000409565b50505050565b6001600160a01b038216620003495760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620001f5565b6200035760008383620005bb565b80600260008282546200036b919062000d51565b90915550506001600160a01b038216600090815260208190526040812080548392906200039a90849062000d51565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36200023a60008383620005d8565b60025490565b600062000402828462000d51565b9392505050565b8254600090819080156200045b57856200042560018362000d6c565b8154811062000438576200043862000d09565b60009182526020909120015464010000000090046001600160e01b03166200045e565b60005b6001600160e01b031692506200047583858760201c565b9150600081118015620004b9575043866200049260018462000d6c565b81548110620004a557620004a562000d09565b60009182526020909120015463ffffffff16145b156200052d57620004d582620005f060201b62000cea1760201c565b86620004e360018462000d6c565b81548110620004f657620004f662000d09565b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550620005b2565b8560405180604001604052806200054f436200065f60201b62000d571760201c565b63ffffffff1681526020016200057085620005f060201b62000cea1760201c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b620005d3838383620006c660201b62000dbc1760201c565b505050565b620005d38383836200073260201b62000e091760201c565b60006001600160e01b038211156200065b5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401620001f5565b5090565b600063ffffffff8211156200065b5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401620001f5565b620006de838383620005d360201b62000ddb1760201c565b6001600160a01b0383166200070257620006f8826200077e565b620005d3620007b6565b6001600160a01b0382166200071c57620006f8836200077e565b62000727836200077e565b620005d3826200077e565b6200074a838383620005d360201b62000ddb1760201c565b6001600160a01b038381166000908152600b6020526040808220548584168352912054620005d392918216911683620007c8565b6001600160a01b03811660009081526005602090815260408083209183905290912054620007b3919062000903565b62000903565b50565b620007c66006620007ad60025490565b565b816001600160a01b0316836001600160a01b031614158015620007eb5750600081115b15620005d3576001600160a01b0383161562000878576001600160a01b0383166000908152600c602090815260408220829162000835919062000952901b62000e3b178562000409565b91509150846001600160a01b031660008051602062002ec283398151915283836040516200086d929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615620005d3576001600160a01b0382166000908152600c6020908152604082208291620008bc9190620003f4901b62000cde178562000409565b91509150836001600160a01b031660008051602062002ec28339815191528383604051620008f4929190918252602082015260400190565b60405180910390a25050505050565b60006200090f62000960565b9050806200091d846200097e565b1015620005d3578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b600062000402828462000d6c565b6000620009796008620009c960201b62000e471760201c565b905090565b805460009081036200099257506000919050565b81548290620009a49060019062000d6c565b81548110620009b757620009b762000d09565b90600052602060002001549050919050565b5490565b828054620009db9062000d86565b90600052602060002090601f016020900481019282620009ff576000855562000a4a565b82601f1062000a1a57805160ff191683800117855562000a4a565b8280016001018555821562000a4a579182015b8281111562000a4a57825182559160200191906001019062000a2d565b506200065b9291505b808211156200065b576000815560010162000a53565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000aaa5762000aaa62000a69565b604052919050565b600082601f83011262000ac457600080fd5b81516001600160401b0381111562000ae05762000ae062000a69565b602062000af6601f8301601f1916820162000a7f565b828152858284870101111562000b0b57600080fd5b60005b8381101562000b2b57858101830151828201840152820162000b0e565b8381111562000b3d5760008385840101525b5095945050505050565b60006001600160401b0382111562000b635762000b6362000a69565b5060051b60200190565b600082601f83011262000b7f57600080fd5b8151602062000b9862000b928362000b47565b62000a7f565b82815260059290921b8401810191818101908684111562000bb857600080fd5b8286015b8481101562000bd5578051835291830191830162000bbc565b509695505050505050565b6000806000806080858703121562000bf757600080fd5b84516001600160401b038082111562000c0f57600080fd5b62000c1d8883890162000ab2565b955060209150818701518181111562000c3557600080fd5b62000c4389828a0162000ab2565b95505060408701518181111562000c5957600080fd5b8701601f8101891362000c6b57600080fd5b805162000c7c62000b928262000b47565b81815260059190911b8201840190848101908b83111562000c9c57600080fd5b928501925b8284101562000cd35783516001600160a01b038116811462000cc35760008081fd5b8252928501929085019062000ca1565b60608b015190975094505050508082111562000cee57600080fd5b5062000cfd8782880162000b6d565b91505092959194509250565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000d4a5762000d4a62000d1f565b5060010190565b6000821982111562000d675762000d6762000d1f565b500190565b60008282101562000d815762000d8162000d1f565b500390565b600181811c9082168062000d9b57607f821691505b60208210810362000dbc57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161010051610120516120b062000e12600039600061124c0152600061129b01526000611276015260006111cf015260006111f90152600061122301526120b06000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c806370a08231116100de578063a457c2d711610097578063d1dc72a311610071578063d1dc72a31461038f578063d505accf14610397578063dd62ed3e146103aa578063f1127ed8146103bd57600080fd5b8063a457c2d714610356578063a9059cbb14610369578063c3cda5201461037c57600080fd5b806370a08231146102d95780637ecebe00146103025780638e539e8c1461031557806395d89b4114610328578063981b24d0146103305780639ab24eb01461034357600080fd5b80633644e5151161014b5780634ee2cd7e116101255780634ee2cd7e14610245578063587cde1e146102585780635c19a95c1461029c5780636fcfff45146102b157600080fd5b80633644e51514610217578063395093511461021f5780633a46b1a81461023257600080fd5b806301ffc9a71461019357806306fdde03146101bb578063095ea7b3146101d057806318160ddd146101e357806323b872dd146101f5578063313ce56714610208575b600080fd5b6101a66101a1366004611d3d565b6103fa565b60405190151581526020015b60405180910390f35b6101c361043a565b6040516101b29190611d67565b6101a66101de366004611dd3565b6104cc565b6002545b6040519081526020016101b2565b6101a6610203366004611dfd565b6104e4565b604051601281526020016101b2565b6101e7610508565b6101a661022d366004611dd3565b610517565b6101e7610240366004611dd3565b610539565b6101e7610253366004611dd3565b6105b8565b610284610266366004611e39565b6001600160a01b039081166000908152600b60205260409020541690565b6040516001600160a01b0390911681526020016101b2565b6102af6102aa366004611e39565b610611565b005b6102c46102bf366004611e39565b61061e565b60405163ffffffff90911681526020016101b2565b6101e76102e7366004611e39565b6001600160a01b031660009081526020819052604090205490565b6101e7610310366004611e39565b610640565b6101e7610323366004611e54565b61065e565b6101c36106ba565b6101e761033e366004611e54565b6106c9565b6101e7610351366004611e39565b6106f4565b6101a6610364366004611dd3565b61077b565b6101a6610377366004611dd3565b6107f6565b6102af61038a366004611e7e565b610804565b6101e761093a565b6102af6103a5366004611ed6565b610944565b6101e76103b8366004611f40565b610aa8565b6103d06103cb366004611f73565b610ad3565b60408051825163ffffffff1681526020928301516001600160e01b031692810192909252016101b2565b60006301ffc9a760e01b6001600160e01b03198316148061043457506001600160e01b031982166000908152600e602052604090205460ff165b92915050565b60606003805461044990611fb3565b80601f016020809104026020016040519081016040528092919081815260200182805461047590611fb3565b80156104c25780601f10610497576101008083540402835291602001916104c2565b820191906000526020600020905b8154815290600101906020018083116104a557829003601f168201915b5050505050905090565b6000336104da818585610e4b565b5060019392505050565b6000336104f2858285610f6f565b6104fd858585610fe3565b506001949350505050565b60006105126111c2565b905090565b6000336104da81858561052a8383610aa8565b6105349190611ffd565b610e4b565b600043821061058f5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064015b60405180910390fd5b6001600160a01b0383166000908152600c602052604090206105b190836112e9565b9392505050565b6001600160a01b0382166000908152600560205260408120819081906105df9085906113a6565b9150915081610606576001600160a01b038516600090815260208190526040902054610608565b805b95945050505050565b61061b338261149c565b50565b6001600160a01b0381166000908152600c602052604081205461043490610d57565b6001600160a01b038116600090815260096020526040812054610434565b60004382106106af5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610586565b610434600d836112e9565b60606004805461044990611fb3565b60008060006106d98460066113a6565b91509150816106ea576002546106ec565b805b949350505050565b6001600160a01b0381166000908152600c60205260408120548015610768576001600160a01b0383166000908152600c60205260409020610736600183612015565b815481106107465761074661202c565b60009182526020909120015464010000000090046001600160e01b031661076b565b60005b6001600160e01b03169392505050565b600033816107898286610aa8565b9050838110156107e95760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610586565b6104fd8286868403610e4b565b6000336104da818585610fe3565b834211156108545760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610586565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906108ce906108c69060a00160405160208183030381529060405280519060200120611515565b858585611563565b90506108d98161158b565b86146109275760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610586565b610931818861149c565b50505050505050565b60006105126115b3565b834211156109945760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610586565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886109c38c61158b565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610a1e82611515565b90506000610a2e82878787611563565b9050896001600160a01b0316816001600160a01b031614610a915760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610586565b610a9c8a8a8a610e4b565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60408051808201909152600080825260208201526001600160a01b0383166000908152600c60205260409020805463ffffffff8416908110610b1757610b1761202c565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610b618282610be7565b6002546001600160e01b031015610bd35760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610586565b610be1600d610cde8361160d565b50505050565b6001600160a01b038216610c3d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610586565b610c4960008383611786565b8060026000828254610c5b9190611ffd565b90915550506001600160a01b03821660009081526020819052604081208054839290610c88908490611ffd565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610cda60008383611791565b5050565b60006105b18284611ffd565b60006001600160e01b03821115610d535760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610586565b5090565b600063ffffffff821115610d535760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610586565b6001600160a01b038316610de057610dd38261179c565b610ddb6117ce565b505050565b6001600160a01b038216610df757610dd38361179c565b610e008361179c565b610ddb8261179c565b6001600160a01b038381166000908152600b6020526040808220548584168352912054610ddb929182169116836117de565b60006105b18284612015565b5490565b6001600160a01b038316610ead5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610586565b6001600160a01b038216610f0e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610586565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610f7b8484610aa8565b90506000198114610be15781811015610fd65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610586565b610be18484848403610e4b565b6001600160a01b0383166110475760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610586565b6001600160a01b0382166110a95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610586565b6110b4838383611786565b6001600160a01b0383166000908152602081905260409020548181101561112c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610586565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611163908490611ffd565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111af91815260200190565b60405180910390a3610be1848484611791565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561121b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561124557507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b8154600090815b8181101561134d576000611304828461191b565b9050848682815481106113195761131961202c565b60009182526020909120015463ffffffff16111561133957809250611347565b611344816001611ffd565b91505b506112f0565b8115611391578461135f600184612015565b8154811061136f5761136f61202c565b60009182526020909120015464010000000090046001600160e01b0316611394565b60005b6001600160e01b031695945050505050565b600080600084116113f25760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b6044820152606401610586565b6113fa611936565b8411156114495760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610586565b60006114558486611941565b8454909150810361146d576000809250925050611495565b60018460010182815481106114845761148461202c565b906000526020600020015492509250505b9250929050565b6001600160a01b038281166000818152600b60208181526040808420805485845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610be18284836117de565b60006104346115226111c2565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061157487878787611a06565b9150915061158181611af3565b5095945050505050565b6001600160a01b03811660009081526009602052604090208054600181018255905b50919050565b60006115c3600880546001019055565b60006115cd611936565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb678160405161160091815260200190565b60405180910390a1919050565b8254600090819080156116585785611626600183612015565b815481106116365761163661202c565b60009182526020909120015464010000000090046001600160e01b031661165b565b60005b6001600160e01b0316925061167483858763ffffffff16565b91506000811180156116b25750438661168e600184612015565b8154811061169e5761169e61202c565b60009182526020909120015463ffffffff16145b15611712576116c082610cea565b866116cc600184612015565b815481106116dc576116dc61202c565b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b0316021790555061177d565b85604051806040016040528061172743610d57565b63ffffffff16815260200161173b85610cea565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b610ddb838383610dbc565b610ddb838383610e09565b6001600160a01b0381166000908152600560209081526040808320918390529091205461061b9190611ca9565b611ca9565b6117dc60066117c960025490565b565b816001600160a01b0316836001600160a01b0316141580156118005750600081115b15610ddb576001600160a01b0383161561188e576001600160a01b0383166000908152600c60205260408120819061183b90610e3b8561160d565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611883929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610ddb576001600160a01b0382166000908152600c6020526040812081906118c490610cde8561160d565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161190c929190918252602082015260400190565b60405180910390a25050505050565b600061192a6002848418612042565b6105b190848416611ffd565b600061051260085490565b8154600090810361195457506000610434565b82546000905b808210156119b057600061196e838361191b565b9050848682815481106119835761198361202c565b9060005260206000200154111561199c578091506119aa565b6119a7816001611ffd565b92505b5061195a565b6000821180156119e5575083856119c8600185612015565b815481106119d8576119d861202c565b9060005260206000200154145b156119fe576119f5600183612015565b92505050610434565b509050610434565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611a3d5750600090506003611aea565b8460ff16601b14158015611a5557508460ff16601c14155b15611a665750600090506004611aea565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611aba573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ae357600060019250925050611aea565b9150600090505b94509492505050565b6000816004811115611b0757611b07612064565b03611b0f5750565b6001816004811115611b2357611b23612064565b03611b705760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610586565b6002816004811115611b8457611b84612064565b03611bd15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610586565b6003816004811115611be557611be5612064565b03611c3d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610586565b6004816004811115611c5157611c51612064565b0361061b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610586565b6000611cb3611936565b905080611cbf84611cf3565b1015610ddb578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b80546000908103611d0657506000919050565b81548290611d1690600190612015565b81548110611d2657611d2661202c565b90600052602060002001549050919050565b919050565b600060208284031215611d4f57600080fd5b81356001600160e01b0319811681146105b157600080fd5b600060208083528351808285015260005b81811015611d9457858101830151858201604001528201611d78565b81811115611da6576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114611d3857600080fd5b60008060408385031215611de657600080fd5b611def83611dbc565b946020939093013593505050565b600080600060608486031215611e1257600080fd5b611e1b84611dbc565b9250611e2960208501611dbc565b9150604084013590509250925092565b600060208284031215611e4b57600080fd5b6105b182611dbc565b600060208284031215611e6657600080fd5b5035919050565b803560ff81168114611d3857600080fd5b60008060008060008060c08789031215611e9757600080fd5b611ea087611dbc565b95506020870135945060408701359350611ebc60608801611e6d565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a031215611ef157600080fd5b611efa88611dbc565b9650611f0860208901611dbc565b95506040880135945060608801359350611f2460808901611e6d565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215611f5357600080fd5b611f5c83611dbc565b9150611f6a60208401611dbc565b90509250929050565b60008060408385031215611f8657600080fd5b611f8f83611dbc565b9150602083013563ffffffff81168114611fa857600080fd5b809150509250929050565b600181811c90821680611fc757607f821691505b6020821081036115ad57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561201057612010611fe7565b500190565b60008282101561202757612027611fe7565b500390565b634e487b7160e01b600052603260045260246000fd5b60008261205f57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207f7f0530662aeeb57cd738b277cc87e8e3e6437cfb8f74fe3937aaf55f3d85f664736f6c634300080d0033dec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724a2646970667358221220043cad261220cf13c284c5a2b952244aa19b742b19b41f3cc93ef4f34c667ef864736f6c634300080d0033", - "deployedBytecode": "0x60806040523480156200001157600080fd5b50600436106200002e5760003560e01c80636d81fc721462000033575b600080fd5b6200004a6200004436600462000432565b62000062565b60405162000059919062000505565b60405180910390f35b6040805160018082528183019092526060916000919060208083019080368337019050509050620001b08585856004818110620000a357620000a362000537565b9050602002810190620000b791906200054d565b810190620000c691906200059e565b86866000818110620000dc57620000dc62000537565b9050602002810190620000f091906200054d565b810190620000ff9190620005ec565b8787600181811062000115576200011562000537565b90506020028101906200012991906200054d565b810190620001389190620005ec565b888860028181106200014e576200014e62000537565b90506020028101906200016291906200054d565b810190620001719190620006b1565b8989600381811062000187576200018762000537565b90506020028101906200019b91906200054d565b810190620001aa91906200075a565b620001e7565b81600081518110620001c657620001c662000537565b6001600160a01b039092166020928302919091019091015290509392505050565b6040516bffffffffffffffffffffffff19606088811b8216602084015233901b16603482015246604882015260688101869052600090620002af90829060880160405160208183030381529060405280519060200120604051806020016200024f9062000407565b601f1982820381018352601f9091011660408190526200027a908a908a908a908a906020016200084a565b60408051601f19818403018152908290526200029a9291602001620008d0565b604051602081830303815290604052620002f0565b6040519091506001600160a01b038216907f2e2b3f61b70d2d131b2a807371103cc98d51adcaa5e9a8f9c32658ad8426e74e90600090a29695505050505050565b60008084471015620003495760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b82516000036200039c5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604482015260640162000340565b8383516020850187f590506001600160a01b038116620003ff5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f7900000000000000604482015260640162000340565b949350505050565b612ee2806200090483390190565b80356001600160a01b03811681146200042d57600080fd5b919050565b6000806000604084860312156200044857600080fd5b620004538462000415565b9250602084013567ffffffffffffffff808211156200047157600080fd5b818601915086601f8301126200048657600080fd5b8135818111156200049657600080fd5b8760208260051b8501011115620004ac57600080fd5b6020830194508093505050509250925092565b600081518084526020808501945080840160005b83811015620004fa5781516001600160a01b031687529582019590820190600101620004d3565b509495945050505050565b6020815260006200051a6020830184620004bf565b9392505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126200056557600080fd5b83018035915067ffffffffffffffff8211156200058157600080fd5b6020019150368190038213156200059757600080fd5b9250929050565b600060208284031215620005b157600080fd5b5035919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715620005e457620005e462000521565b604052919050565b600060208083850312156200060057600080fd5b823567ffffffffffffffff808211156200061957600080fd5b818501915085601f8301126200062e57600080fd5b81358181111562000643576200064362000521565b62000657601f8201601f19168501620005b8565b915080825286848285010111156200066e57600080fd5b8084840185840137600090820190930192909252509392505050565b600067ffffffffffffffff821115620006a757620006a762000521565b5060051b60200190565b60006020808385031215620006c557600080fd5b823567ffffffffffffffff811115620006dd57600080fd5b8301601f81018513620006ef57600080fd5b80356200070662000700826200068a565b620005b8565b81815260059190911b820183019083810190878311156200072657600080fd5b928401925b828410156200074f576200073f8462000415565b825292840192908401906200072b565b979650505050505050565b600060208083850312156200076e57600080fd5b823567ffffffffffffffff8111156200078657600080fd5b8301601f810185136200079857600080fd5b8035620007a962000700826200068a565b81815260059190911b82018301908381019087831115620007c957600080fd5b928401925b828410156200074f57833582529284019290840190620007ce565b60005b8381101562000806578181015183820152602001620007ec565b8381111562000816576000848401525b50505050565b6000815180845262000836816020860160208601620007e9565b601f01601f19169290920160200192915050565b6080815260006200085f60808301876200081c565b6020838203818501526200087482886200081c565b915083820360408501526200088a8287620004bf565b8481036060860152855180825282870193509082019060005b81811015620008c157845183529383019391830191600101620008a3565b50909998505050505050505050565b60008351620008e4818460208801620007e9565b835190830190620008fa818360208801620007e9565b0194935050505056fe6101406040523480156200001257600080fd5b5060405162002ee238038062002ee2833981016040819052620000359162000be0565b8380604051806040016040528060018152602001603160f81b815250868681600390805190602001906200006b929190620009cd565b50805162000081906004906020840190620009cd565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c09485019091528151919096012090529290925261012052506200012790506336372b0760e01b6200019e565b60005b825181101562000193576200017e8382815181106200014d576200014d62000d09565b60200260200101518383815181106200016a576200016a62000d09565b60200260200101516200022360201b60201c565b806200018a8162000d35565b9150506200012a565b505050505062000dc2565b6001600160e01b03198082169003620001fe5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064015b60405180910390fd5b6001600160e01b0319166000908152600e60205260409020805460ff19166001179055565b6200023a82826200023e60201b62000b571760201c565b5050565b620002558282620002f160201b62000be71760201c565b6001600160e01b0362000269620003ee8216565b1115620002d25760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401620001f5565b620002eb600d62000cde620003f460201b178362000409565b50505050565b6001600160a01b038216620003495760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620001f5565b6200035760008383620005bb565b80600260008282546200036b919062000d51565b90915550506001600160a01b038216600090815260208190526040812080548392906200039a90849062000d51565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36200023a60008383620005d8565b60025490565b600062000402828462000d51565b9392505050565b8254600090819080156200045b57856200042560018362000d6c565b8154811062000438576200043862000d09565b60009182526020909120015464010000000090046001600160e01b03166200045e565b60005b6001600160e01b031692506200047583858760201c565b9150600081118015620004b9575043866200049260018462000d6c565b81548110620004a557620004a562000d09565b60009182526020909120015463ffffffff16145b156200052d57620004d582620005f060201b62000cea1760201c565b86620004e360018462000d6c565b81548110620004f657620004f662000d09565b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550620005b2565b8560405180604001604052806200054f436200065f60201b62000d571760201c565b63ffffffff1681526020016200057085620005f060201b62000cea1760201c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b620005d3838383620006c660201b62000dbc1760201c565b505050565b620005d38383836200073260201b62000e091760201c565b60006001600160e01b038211156200065b5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401620001f5565b5090565b600063ffffffff8211156200065b5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401620001f5565b620006de838383620005d360201b62000ddb1760201c565b6001600160a01b0383166200070257620006f8826200077e565b620005d3620007b6565b6001600160a01b0382166200071c57620006f8836200077e565b62000727836200077e565b620005d3826200077e565b6200074a838383620005d360201b62000ddb1760201c565b6001600160a01b038381166000908152600b6020526040808220548584168352912054620005d392918216911683620007c8565b6001600160a01b03811660009081526005602090815260408083209183905290912054620007b3919062000903565b62000903565b50565b620007c66006620007ad60025490565b565b816001600160a01b0316836001600160a01b031614158015620007eb5750600081115b15620005d3576001600160a01b0383161562000878576001600160a01b0383166000908152600c602090815260408220829162000835919062000952901b62000e3b178562000409565b91509150846001600160a01b031660008051602062002ec283398151915283836040516200086d929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615620005d3576001600160a01b0382166000908152600c6020908152604082208291620008bc9190620003f4901b62000cde178562000409565b91509150836001600160a01b031660008051602062002ec28339815191528383604051620008f4929190918252602082015260400190565b60405180910390a25050505050565b60006200090f62000960565b9050806200091d846200097e565b1015620005d3578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b600062000402828462000d6c565b6000620009796008620009c960201b62000e471760201c565b905090565b805460009081036200099257506000919050565b81548290620009a49060019062000d6c565b81548110620009b757620009b762000d09565b90600052602060002001549050919050565b5490565b828054620009db9062000d86565b90600052602060002090601f016020900481019282620009ff576000855562000a4a565b82601f1062000a1a57805160ff191683800117855562000a4a565b8280016001018555821562000a4a579182015b8281111562000a4a57825182559160200191906001019062000a2d565b506200065b9291505b808211156200065b576000815560010162000a53565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000aaa5762000aaa62000a69565b604052919050565b600082601f83011262000ac457600080fd5b81516001600160401b0381111562000ae05762000ae062000a69565b602062000af6601f8301601f1916820162000a7f565b828152858284870101111562000b0b57600080fd5b60005b8381101562000b2b57858101830151828201840152820162000b0e565b8381111562000b3d5760008385840101525b5095945050505050565b60006001600160401b0382111562000b635762000b6362000a69565b5060051b60200190565b600082601f83011262000b7f57600080fd5b8151602062000b9862000b928362000b47565b62000a7f565b82815260059290921b8401810191818101908684111562000bb857600080fd5b8286015b8481101562000bd5578051835291830191830162000bbc565b509695505050505050565b6000806000806080858703121562000bf757600080fd5b84516001600160401b038082111562000c0f57600080fd5b62000c1d8883890162000ab2565b955060209150818701518181111562000c3557600080fd5b62000c4389828a0162000ab2565b95505060408701518181111562000c5957600080fd5b8701601f8101891362000c6b57600080fd5b805162000c7c62000b928262000b47565b81815260059190911b8201840190848101908b83111562000c9c57600080fd5b928501925b8284101562000cd35783516001600160a01b038116811462000cc35760008081fd5b8252928501929085019062000ca1565b60608b015190975094505050508082111562000cee57600080fd5b5062000cfd8782880162000b6d565b91505092959194509250565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000d4a5762000d4a62000d1f565b5060010190565b6000821982111562000d675762000d6762000d1f565b500190565b60008282101562000d815762000d8162000d1f565b500390565b600181811c9082168062000d9b57607f821691505b60208210810362000dbc57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161010051610120516120b062000e12600039600061124c0152600061129b01526000611276015260006111cf015260006111f90152600061122301526120b06000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c806370a08231116100de578063a457c2d711610097578063d1dc72a311610071578063d1dc72a31461038f578063d505accf14610397578063dd62ed3e146103aa578063f1127ed8146103bd57600080fd5b8063a457c2d714610356578063a9059cbb14610369578063c3cda5201461037c57600080fd5b806370a08231146102d95780637ecebe00146103025780638e539e8c1461031557806395d89b4114610328578063981b24d0146103305780639ab24eb01461034357600080fd5b80633644e5151161014b5780634ee2cd7e116101255780634ee2cd7e14610245578063587cde1e146102585780635c19a95c1461029c5780636fcfff45146102b157600080fd5b80633644e51514610217578063395093511461021f5780633a46b1a81461023257600080fd5b806301ffc9a71461019357806306fdde03146101bb578063095ea7b3146101d057806318160ddd146101e357806323b872dd146101f5578063313ce56714610208575b600080fd5b6101a66101a1366004611d3d565b6103fa565b60405190151581526020015b60405180910390f35b6101c361043a565b6040516101b29190611d67565b6101a66101de366004611dd3565b6104cc565b6002545b6040519081526020016101b2565b6101a6610203366004611dfd565b6104e4565b604051601281526020016101b2565b6101e7610508565b6101a661022d366004611dd3565b610517565b6101e7610240366004611dd3565b610539565b6101e7610253366004611dd3565b6105b8565b610284610266366004611e39565b6001600160a01b039081166000908152600b60205260409020541690565b6040516001600160a01b0390911681526020016101b2565b6102af6102aa366004611e39565b610611565b005b6102c46102bf366004611e39565b61061e565b60405163ffffffff90911681526020016101b2565b6101e76102e7366004611e39565b6001600160a01b031660009081526020819052604090205490565b6101e7610310366004611e39565b610640565b6101e7610323366004611e54565b61065e565b6101c36106ba565b6101e761033e366004611e54565b6106c9565b6101e7610351366004611e39565b6106f4565b6101a6610364366004611dd3565b61077b565b6101a6610377366004611dd3565b6107f6565b6102af61038a366004611e7e565b610804565b6101e761093a565b6102af6103a5366004611ed6565b610944565b6101e76103b8366004611f40565b610aa8565b6103d06103cb366004611f73565b610ad3565b60408051825163ffffffff1681526020928301516001600160e01b031692810192909252016101b2565b60006301ffc9a760e01b6001600160e01b03198316148061043457506001600160e01b031982166000908152600e602052604090205460ff165b92915050565b60606003805461044990611fb3565b80601f016020809104026020016040519081016040528092919081815260200182805461047590611fb3565b80156104c25780601f10610497576101008083540402835291602001916104c2565b820191906000526020600020905b8154815290600101906020018083116104a557829003601f168201915b5050505050905090565b6000336104da818585610e4b565b5060019392505050565b6000336104f2858285610f6f565b6104fd858585610fe3565b506001949350505050565b60006105126111c2565b905090565b6000336104da81858561052a8383610aa8565b6105349190611ffd565b610e4b565b600043821061058f5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064015b60405180910390fd5b6001600160a01b0383166000908152600c602052604090206105b190836112e9565b9392505050565b6001600160a01b0382166000908152600560205260408120819081906105df9085906113a6565b9150915081610606576001600160a01b038516600090815260208190526040902054610608565b805b95945050505050565b61061b338261149c565b50565b6001600160a01b0381166000908152600c602052604081205461043490610d57565b6001600160a01b038116600090815260096020526040812054610434565b60004382106106af5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610586565b610434600d836112e9565b60606004805461044990611fb3565b60008060006106d98460066113a6565b91509150816106ea576002546106ec565b805b949350505050565b6001600160a01b0381166000908152600c60205260408120548015610768576001600160a01b0383166000908152600c60205260409020610736600183612015565b815481106107465761074661202c565b60009182526020909120015464010000000090046001600160e01b031661076b565b60005b6001600160e01b03169392505050565b600033816107898286610aa8565b9050838110156107e95760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610586565b6104fd8286868403610e4b565b6000336104da818585610fe3565b834211156108545760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610586565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906108ce906108c69060a00160405160208183030381529060405280519060200120611515565b858585611563565b90506108d98161158b565b86146109275760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610586565b610931818861149c565b50505050505050565b60006105126115b3565b834211156109945760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610586565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886109c38c61158b565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610a1e82611515565b90506000610a2e82878787611563565b9050896001600160a01b0316816001600160a01b031614610a915760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610586565b610a9c8a8a8a610e4b565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60408051808201909152600080825260208201526001600160a01b0383166000908152600c60205260409020805463ffffffff8416908110610b1757610b1761202c565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610b618282610be7565b6002546001600160e01b031015610bd35760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610586565b610be1600d610cde8361160d565b50505050565b6001600160a01b038216610c3d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610586565b610c4960008383611786565b8060026000828254610c5b9190611ffd565b90915550506001600160a01b03821660009081526020819052604081208054839290610c88908490611ffd565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610cda60008383611791565b5050565b60006105b18284611ffd565b60006001600160e01b03821115610d535760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610586565b5090565b600063ffffffff821115610d535760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610586565b6001600160a01b038316610de057610dd38261179c565b610ddb6117ce565b505050565b6001600160a01b038216610df757610dd38361179c565b610e008361179c565b610ddb8261179c565b6001600160a01b038381166000908152600b6020526040808220548584168352912054610ddb929182169116836117de565b60006105b18284612015565b5490565b6001600160a01b038316610ead5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610586565b6001600160a01b038216610f0e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610586565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610f7b8484610aa8565b90506000198114610be15781811015610fd65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610586565b610be18484848403610e4b565b6001600160a01b0383166110475760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610586565b6001600160a01b0382166110a95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610586565b6110b4838383611786565b6001600160a01b0383166000908152602081905260409020548181101561112c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610586565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611163908490611ffd565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111af91815260200190565b60405180910390a3610be1848484611791565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561121b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561124557507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b8154600090815b8181101561134d576000611304828461191b565b9050848682815481106113195761131961202c565b60009182526020909120015463ffffffff16111561133957809250611347565b611344816001611ffd565b91505b506112f0565b8115611391578461135f600184612015565b8154811061136f5761136f61202c565b60009182526020909120015464010000000090046001600160e01b0316611394565b60005b6001600160e01b031695945050505050565b600080600084116113f25760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b6044820152606401610586565b6113fa611936565b8411156114495760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610586565b60006114558486611941565b8454909150810361146d576000809250925050611495565b60018460010182815481106114845761148461202c565b906000526020600020015492509250505b9250929050565b6001600160a01b038281166000818152600b60208181526040808420805485845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610be18284836117de565b60006104346115226111c2565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061157487878787611a06565b9150915061158181611af3565b5095945050505050565b6001600160a01b03811660009081526009602052604090208054600181018255905b50919050565b60006115c3600880546001019055565b60006115cd611936565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb678160405161160091815260200190565b60405180910390a1919050565b8254600090819080156116585785611626600183612015565b815481106116365761163661202c565b60009182526020909120015464010000000090046001600160e01b031661165b565b60005b6001600160e01b0316925061167483858763ffffffff16565b91506000811180156116b25750438661168e600184612015565b8154811061169e5761169e61202c565b60009182526020909120015463ffffffff16145b15611712576116c082610cea565b866116cc600184612015565b815481106116dc576116dc61202c565b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b0316021790555061177d565b85604051806040016040528061172743610d57565b63ffffffff16815260200161173b85610cea565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b610ddb838383610dbc565b610ddb838383610e09565b6001600160a01b0381166000908152600560209081526040808320918390529091205461061b9190611ca9565b611ca9565b6117dc60066117c960025490565b565b816001600160a01b0316836001600160a01b0316141580156118005750600081115b15610ddb576001600160a01b0383161561188e576001600160a01b0383166000908152600c60205260408120819061183b90610e3b8561160d565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611883929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610ddb576001600160a01b0382166000908152600c6020526040812081906118c490610cde8561160d565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161190c929190918252602082015260400190565b60405180910390a25050505050565b600061192a6002848418612042565b6105b190848416611ffd565b600061051260085490565b8154600090810361195457506000610434565b82546000905b808210156119b057600061196e838361191b565b9050848682815481106119835761198361202c565b9060005260206000200154111561199c578091506119aa565b6119a7816001611ffd565b92505b5061195a565b6000821180156119e5575083856119c8600185612015565b815481106119d8576119d861202c565b9060005260206000200154145b156119fe576119f5600183612015565b92505050610434565b509050610434565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611a3d5750600090506003611aea565b8460ff16601b14158015611a5557508460ff16601c14155b15611a665750600090506004611aea565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611aba573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ae357600060019250925050611aea565b9150600090505b94509492505050565b6000816004811115611b0757611b07612064565b03611b0f5750565b6001816004811115611b2357611b23612064565b03611b705760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610586565b6002816004811115611b8457611b84612064565b03611bd15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610586565b6003816004811115611be557611be5612064565b03611c3d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610586565b6004816004811115611c5157611c51612064565b0361061b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610586565b6000611cb3611936565b905080611cbf84611cf3565b1015610ddb578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b80546000908103611d0657506000919050565b81548290611d1690600190612015565b81548110611d2657611d2661202c565b90600052602060002001549050919050565b919050565b600060208284031215611d4f57600080fd5b81356001600160e01b0319811681146105b157600080fd5b600060208083528351808285015260005b81811015611d9457858101830151858201604001528201611d78565b81811115611da6576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114611d3857600080fd5b60008060408385031215611de657600080fd5b611def83611dbc565b946020939093013593505050565b600080600060608486031215611e1257600080fd5b611e1b84611dbc565b9250611e2960208501611dbc565b9150604084013590509250925092565b600060208284031215611e4b57600080fd5b6105b182611dbc565b600060208284031215611e6657600080fd5b5035919050565b803560ff81168114611d3857600080fd5b60008060008060008060c08789031215611e9757600080fd5b611ea087611dbc565b95506020870135945060408701359350611ebc60608801611e6d565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a031215611ef157600080fd5b611efa88611dbc565b9650611f0860208901611dbc565b95506040880135945060608801359350611f2460808901611e6d565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215611f5357600080fd5b611f5c83611dbc565b9150611f6a60208401611dbc565b90509250929050565b60008060408385031215611f8657600080fd5b611f8f83611dbc565b9150602083013563ffffffff81168114611fa857600080fd5b809150509250929050565b600181811c90821680611fc757607f821691505b6020821081036115ad57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561201057612010611fe7565b500190565b60008282101561202757612027611fe7565b500390565b634e487b7160e01b600052603260045260246000fd5b60008261205f57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207f7f0530662aeeb57cd738b277cc87e8e3e6437cfb8f74fe3937aaf55f3d85f664736f6c634300080d0033dec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724a2646970667358221220043cad261220cf13c284c5a2b952244aa19b742b19b41f3cc93ef4f34c667ef864736f6c634300080d0033", - "devdoc": { - "kind": "dev", - "methods": { - "create(address,bytes[])": { - "details": "Creates an ERC-20 votes token", - "params": { - "creator": "The address creating the module", - "data": "The array of bytes used to create the token" - }, - "returns": { - "_0": "address The address of the created token" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "notice": "Token Factory used to deploy votes tokens", - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/deployments/goerli/VetoERC20Voting.json b/deployments/goerli/VetoERC20Voting.json index 196857e5..ba9ac4b7 100644 --- a/deployments/goerli/VetoERC20Voting.json +++ b/deployments/goerli/VetoERC20Voting.json @@ -1,5 +1,5 @@ { - "address": "0xa249d40626B5CD42453d0C6b920dF0c4D2260e62", + "address": "0x4Bdb792146530Ab466662D2AF7687139Fe59b885", "abi": [ { "anonymous": false, @@ -196,49 +196,9 @@ { "inputs": [ { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "enum Enum.Operation", - "name": "operation", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "safeTxGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "baseGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gasPrice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "gasToken", - "type": "address" - }, - { - "internalType": "address payable", - "name": "refundReceiver", - "type": "address" + "internalType": "bytes32", + "name": "_transactionHash", + "type": "bytes32" } ], "name": "getIsVetoed", @@ -311,65 +271,6 @@ "stateMutability": "pure", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "enum Enum.Operation", - "name": "operation", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "safeTxGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "baseGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gasPrice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "gasToken", - "type": "address" - }, - { - "internalType": "address payable", - "name": "refundReceiver", - "type": "address" - } - ], - "name": "getVetoVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "isFrozen", @@ -588,28 +489,28 @@ "type": "function" } ], - "transactionHash": "0xb836087d7730b22a8042cc91db2096c16c1a2f643178f637de14ba7375b4c6f8", + "transactionHash": "0xf3f193168b500ae6d7e54aaef1af518d52e20f0ff4ea421af12e3a625a405484", "receipt": { "to": null, "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", - "contractAddress": "0xa249d40626B5CD42453d0C6b920dF0c4D2260e62", - "transactionIndex": 32, - "gasUsed": "1026039", + "contractAddress": "0x4Bdb792146530Ab466662D2AF7687139Fe59b885", + "transactionIndex": 37, + "gasUsed": "977754", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8880826cf19b1083b1a639026856dc9fb9d362e569dc2209b955170a410f7da3", - "transactionHash": "0xb836087d7730b22a8042cc91db2096c16c1a2f643178f637de14ba7375b4c6f8", + "blockHash": "0xd09b141d940c173642aee6a765f2f60e13d49daf48a66898bae42eacee4a3747", + "transactionHash": "0xf3f193168b500ae6d7e54aaef1af518d52e20f0ff4ea421af12e3a625a405484", "logs": [], - "blockNumber": 7752444, - "cumulativeGasUsed": "8860125", + "blockNumber": 7804426, + "cumulativeGasUsed": "7285118", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "45f7710f616c39a15b2c4779b7f6d0c2", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"FreezeProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votesCast\",\"type\":\"uint256\"}],\"name\":\"FreezeVoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transactionHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votesCast\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"freeze\",\"type\":\"bool\"}],\"name\":\"VetoVoteCast\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"castFreezeVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_transactionHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_freeze\",\"type\":\"bool\"}],\"name\":\"castVetoVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defrost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeBlockDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalBlockDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalCreatedBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalVoteCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeVotesThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"refundReceiver\",\"type\":\"address\"}],\"name\":\"getIsVetoed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"}],\"name\":\"getTransactionHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"refundReceiver\",\"type\":\"address\"}],\"name\":\"getVetoVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transactionVetoVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeBlockDuration\",\"type\":\"uint256\"}],\"name\":\"updateFreezeBlockDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeProposalBlockDuration\",\"type\":\"uint256\"}],\"name\":\"updateFreezeProposalBlockDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeVotesThreshold\",\"type\":\"uint256\"}],\"name\":\"updateFreezeVotesThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vetoVotesThreshold\",\"type\":\"uint256\"}],\"name\":\"updateVetoVotesThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"userHasFreezeVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"userHasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vetoGuard\",\"outputs\":[{\"internalType\":\"contract IVetoGuard\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vetoVotesThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votesToken\",\"outputs\":[{\"internalType\":\"contract IVotes\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"castVetoVote(bytes32,bool)\":{\"params\":{\"_freeze\":\"Bool indicating whether the voter thinks the DAO should also be frozen\",\"_transactionHash\":\"The hash of the transaction data\"}},\"getIsVetoed(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"},\"returns\":{\"_0\":\"bool True if the transaction is vetoed\"}},\"getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"details\":\"Returns the hash of all the transaction dataIt is important to note that this implementation is different than that in the Gnosis Safe contractThis implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interfaceThis implementation also omits the EIP-712 related values, since these hashes are not being signed by users\",\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"},\"returns\":{\"_0\":\"Transaction hash bytes.\"}},\"getVetoVotes(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"},\"returns\":{\"_0\":\"uint256 The number of veto votes that have been cast\"}},\"isFrozen()\":{\"returns\":{\"_0\":\"bool Indicates whether the DAO is currently frozen\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateFreezeBlockDuration(uint256)\":{\"params\":{\"_freezeBlockDuration\":\"The number of blocks a freeze last, from time of freeze proposal creation\"}},\"updateFreezeProposalBlockDuration(uint256)\":{\"params\":{\"_freezeProposalBlockDuration\":\"The number of blocks a freeze proposal has to succeed\"}},\"updateFreezeVotesThreshold(uint256)\":{\"params\":{\"_freezeVotesThreshold\":\"Number of freeze votes required to activate a freeze\"}},\"updateVetoVotesThreshold(uint256)\":{\"params\":{\"_vetoVotesThreshold\":\"The number of votes required to veto a transaction\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"castFreezeVote()\":{\"notice\":\"Allows a user to cast a freeze vote if there is an active freeze proposalIf there isn't an active freeze proposal, it is created and the user's votes are cast\"},\"castVetoVote(bytes32,bool)\":{\"notice\":\"Allows the msg.sender to cast veto and freeze votes on the specified transaction\"},\"defrost()\":{\"notice\":\"Unfreezes the DAO, only callable by the owner\"},\"getIsVetoed(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"notice\":\"Returns whether the specified transaction has been vetoed\"},\"getVetoVotes(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"notice\":\"Returns the number of votes that have been cast to veto the specified transaction\"},\"isFrozen()\":{\"notice\":\"Returns true if the DAO is currently frozen\"},\"setUp(bytes)\":{\"notice\":\"Initialize function, will be triggered when a new proxy is deployed\"},\"updateFreezeBlockDuration(uint256)\":{\"notice\":\"Updates the freeze block duration, only callable by the owner\"},\"updateFreezeProposalBlockDuration(uint256)\":{\"notice\":\"Updates the freeze proposal blocks duration, only callable by the owner\"},\"updateFreezeVotesThreshold(uint256)\":{\"notice\":\"Updates the freeze votes threshold, only callable by the owner\"},\"updateVetoVotesThreshold(uint256)\":{\"notice\":\"Updates the veto votes threshold, only callable by the owner\"}},\"notice\":\"A contract for casting veto votes with an ERC20 votes token\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/VetoERC20Voting.sol\":\"VetoERC20Voting\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"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/governance/utils/IVotes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 IVotes {\\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 the end of a past block (`blockNumber`).\\n */\\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\\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 blockNumber) 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(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0xf5324a55ee9c0b4a840ea57c055ac9d046f88986ceef567e1cf68113e46a79c0\",\"license\":\"MIT\"},\"contracts/TransactionHasher.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\nabstract contract TransactionHasher {\\r\\n /// @dev Returns the hash of all the transaction data\\r\\n /// @dev It is important to note that this implementation is different than that in the Gnosis Safe contract\\r\\n /// @dev This implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interface\\r\\n /// @dev This implementation also omits the EIP-712 related values, since these hashes are not being signed by users\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return Transaction hash bytes.\\r\\n function getTransactionHash(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address refundReceiver\\r\\n ) public pure returns (bytes32) {\\r\\n return keccak256(\\r\\n abi.encode(\\r\\n to,\\r\\n value,\\r\\n keccak256(data),\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n )\\r\\n );\\r\\n }\\r\\n}\",\"keccak256\":\"0x1d6ca309cc27debd165993a3929e3bdd0de8eb3c3eff79e86479ce4e2955e16d\",\"license\":\"Unlicense\"},\"contracts/VetoERC20Voting.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/IVetoGuard.sol\\\";\\r\\nimport \\\"./interfaces/IVetoERC20Voting.sol\\\";\\r\\nimport \\\"./TransactionHasher.sol\\\";\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/governance/utils/IVotes.sol\\\";\\r\\n\\r\\n/// @notice A contract for casting veto votes with an ERC20 votes token\\r\\ncontract VetoERC20Voting is\\r\\n IVetoERC20Voting,\\r\\n TransactionHasher,\\r\\n FactoryFriendly\\r\\n{\\r\\n uint256 public vetoVotesThreshold; // Number of votes required to veto a transaction\\r\\n uint256 public freezeVotesThreshold; // Number of freeze votes required to activate a freeze\\r\\n uint256 public freezeProposalCreatedBlock; // Block number the freeze proposal was created at\\r\\n uint256 public freezeProposalVoteCount; // Number of accrued freeze votes\\r\\n uint256 public freezeProposalBlockDuration; // Number of blocks a freeze proposal has to succeed\\r\\n uint256 public freezeBlockDuration; // Number of blocks a freeze last, from time of freeze proposal creation\\r\\n IVotes public votesToken;\\r\\n IVetoGuard public vetoGuard;\\r\\n mapping(bytes32 => uint256) public transactionVetoVotes;\\r\\n mapping(address => mapping(bytes32 => bool)) public userHasVoted;\\r\\n mapping(address => mapping(uint256 => bool)) public userHasFreezeVoted;\\r\\n\\r\\n /// @notice Initialize function, will be triggered when a new proxy is deployed\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n __Ownable_init();\\r\\n (\\r\\n address _owner,\\r\\n uint256 _vetoVotesThreshold,\\r\\n uint256 _freezeVotesThreshold,\\r\\n uint256 _freezeProposalBlockDuration,\\r\\n uint256 _freezeBlockDuration,\\r\\n address _votesToken,\\r\\n address _vetoGuard\\r\\n ) = abi.decode(initializeParams, (address, uint256, uint256, uint256, uint256, address, address));\\r\\n\\r\\n _transferOwnership(_owner);\\r\\n vetoVotesThreshold = _vetoVotesThreshold;\\r\\n freezeVotesThreshold = _freezeVotesThreshold;\\r\\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\\r\\n freezeBlockDuration = _freezeBlockDuration;\\r\\n votesToken = IVotes(_votesToken);\\r\\n vetoGuard = IVetoGuard(_vetoGuard);\\r\\n }\\r\\n\\r\\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\\r\\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external {\\r\\n // Check that user has not yet voted\\r\\n require(\\r\\n !userHasVoted[msg.sender][_transactionHash],\\r\\n \\\"User has already voted\\\"\\r\\n );\\r\\n\\r\\n // Get the block number the transaction was queued on the VetoGuard\\r\\n uint256 queuedBlockNumber = vetoGuard.getTransactionQueuedBlock(\\r\\n _transactionHash\\r\\n );\\r\\n\\r\\n // Check that the transaction has been queued\\r\\n require(queuedBlockNumber != 0, \\\"Transaction has not yet been queued\\\");\\r\\n\\r\\n uint256 vetoVotes = votesToken.getPastVotes(\\r\\n msg.sender,\\r\\n queuedBlockNumber - 1\\r\\n );\\r\\n\\r\\n require(vetoVotes > 0, \\\"User has no votes\\\");\\r\\n\\r\\n // Add the user votes to the veto vote count for this transaction\\r\\n transactionVetoVotes[_transactionHash] += vetoVotes;\\r\\n\\r\\n // If the user is voting to freeze, count that vote as well\\r\\n if (_freeze) {\\r\\n castFreezeVote();\\r\\n }\\r\\n\\r\\n // User has voted\\r\\n userHasVoted[msg.sender][_transactionHash] = true;\\r\\n\\r\\n emit VetoVoteCast(msg.sender, _transactionHash, vetoVotes, _freeze);\\r\\n }\\r\\n\\r\\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\\r\\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\\r\\n function castFreezeVote() public {\\r\\n uint256 userVotes;\\r\\n\\r\\n if (\\r\\n block.number >\\r\\n freezeProposalCreatedBlock + freezeProposalBlockDuration\\r\\n ) {\\r\\n // Create freeze proposal, set total votes to msg.sender's vote count\\r\\n freezeProposalCreatedBlock = block.number;\\r\\n\\r\\n userVotes = votesToken.getPastVotes(\\r\\n msg.sender,\\r\\n freezeProposalCreatedBlock - 1\\r\\n );\\r\\n require(userVotes > 0, \\\"User has no votes\\\");\\r\\n\\r\\n freezeProposalVoteCount = userVotes;\\r\\n\\r\\n emit FreezeProposalCreated(msg.sender);\\r\\n } else {\\r\\n // There is an existing freeze proposal, count user's votes\\r\\n require(\\r\\n !userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock],\\r\\n \\\"User has already voted\\\"\\r\\n );\\r\\n\\r\\n userVotes = votesToken.getPastVotes(\\r\\n msg.sender,\\r\\n freezeProposalCreatedBlock - 1\\r\\n );\\r\\n require(userVotes > 0, \\\"User has no votes\\\");\\r\\n\\r\\n freezeProposalVoteCount += userVotes;\\r\\n }\\r\\n\\r\\n userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock] = true;\\r\\n\\r\\n emit FreezeVoteCast(msg.sender, userVotes);\\r\\n }\\r\\n\\r\\n /// @notice Unfreezes the DAO, only callable by the owner\\r\\n function defrost() public onlyOwner {\\r\\n require(isFrozen(), \\\"DAO is not already frozen\\\");\\r\\n freezeProposalCreatedBlock = 0;\\r\\n freezeProposalVoteCount = 0;\\r\\n }\\r\\n\\r\\n /// @notice Updates the veto votes threshold, only callable by the owner\\r\\n /// @param _vetoVotesThreshold The number of votes required to veto a transaction\\r\\n function updateVetoVotesThreshold(uint256 _vetoVotesThreshold)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n vetoVotesThreshold = _vetoVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze votes threshold, only callable by the owner\\r\\n /// @param _freezeVotesThreshold Number of freeze votes required to activate a freeze\\r\\n function updateFreezeVotesThreshold(uint256 _freezeVotesThreshold)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n freezeVotesThreshold = _freezeVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze proposal blocks duration, only callable by the owner\\r\\n /// @param _freezeProposalBlockDuration The number of blocks a freeze proposal has to succeed\\r\\n function updateFreezeProposalBlockDuration(\\r\\n uint256 _freezeProposalBlockDuration\\r\\n ) external onlyOwner {\\r\\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze block duration, only callable by the owner\\r\\n /// @param _freezeBlockDuration The number of blocks a freeze last, from time of freeze proposal creation\\r\\n function updateFreezeBlockDuration(uint256 _freezeBlockDuration)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n freezeBlockDuration = _freezeBlockDuration;\\r\\n }\\r\\n\\r\\n /// @notice Returns whether the specified transaction has been vetoed\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return bool True if the transaction is vetoed\\r\\n function getIsVetoed(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver\\r\\n ) external view returns (bool) {\\r\\n return\\r\\n transactionVetoVotes[\\r\\n getTransactionHash(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n )\\r\\n ] > vetoVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Returns the number of votes that have been cast to veto the specified transaction\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return uint256 The number of veto votes that have been cast\\r\\n function getVetoVotes(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver\\r\\n ) external view returns (uint256) {\\r\\n return\\r\\n transactionVetoVotes[\\r\\n getTransactionHash(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n )\\r\\n ];\\r\\n }\\r\\n\\r\\n /// @notice Returns true if the DAO is currently frozen\\r\\n /// @return bool Indicates whether the DAO is currently frozen\\r\\n function isFrozen() public view returns (bool) {\\r\\n if (\\r\\n freezeProposalVoteCount > freezeVotesThreshold &&\\r\\n block.number < freezeProposalCreatedBlock + freezeBlockDuration\\r\\n ) {\\r\\n return true;\\r\\n }\\r\\n\\r\\n return false;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x9c1d5b35568fa242a70a109308199ac88a2e3efb5ba4f6e0bbf20ec38e5c0d9e\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoERC20Voting.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoERC20Voting {\\r\\n event VetoVoteCast(\\r\\n address indexed voter,\\r\\n bytes32 indexed transactionHash,\\r\\n uint256 votesCast,\\r\\n bool freeze\\r\\n );\\r\\n\\r\\n event FreezeVoteCast(address indexed voter, uint256 votesCast);\\r\\n\\r\\n event FreezeProposalCreated(address indexed creator);\\r\\n\\r\\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\\r\\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external;\\r\\n\\r\\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\\r\\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\\r\\n function castFreezeVote() external;\\r\\n\\r\\n /// @notice Returns whether the specified functions has been vetoed\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return bool True if the transaction is vetoed\\r\\n function getIsVetoed(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver\\r\\n ) external view returns (bool);\\r\\n\\r\\n /// @notice Returns true if the DAO is currently frozen\\r\\n /// @return bool Indicates whether the DAO is currently frozen\\r\\n function isFrozen() external view returns (bool);\\r\\n}\\r\\n\",\"keccak256\":\"0x311504cd22c6966073173ff50df3e1a94bca90f3c4eb811b07aef9d2fa70d0da\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoGuard {\\r\\n event VetoGuardSetup(\\r\\n address creator,\\r\\n uint256 executionDelayBlocks,\\r\\n address indexed owner,\\r\\n address indexed vetoERC20Voting\\r\\n );\\r\\n\\r\\n event TransactionQueued(\\r\\n address indexed queuer,\\r\\n bytes32 indexed transactionHash,\\r\\n bytes indexed signatures\\r\\n );\\r\\n\\r\\n /// @notice Allows a user to queue the transaction, requires valid signatures\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\r\\n function queueTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external;\\r\\n\\r\\n /// @notice Gets the block number that the transaction was queued at\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return uint256 The block number\\r\\n function getTransactionQueuedBlock(bytes32 _transactionHash)\\r\\n external\\r\\n view\\r\\n returns (uint256);\\r\\n}\\r\\n\",\"keccak256\":\"0xd20724f921b4adc649088e7877f58cbb551761198e655ca8e37b7ff6996ec4e3\",\"license\":\"Unlicense\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50611199806100206000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c8063919d8fdf116100de578063a91e5cab11610097578063e9c17a9411610071578063e9c17a9414610366578063f21cdf6f1461036f578063f2fde38b14610377578063fb80bccc1461038a57600080fd5b8063a91e5cab14610338578063aba9dfe914610340578063e0b44b5a1461035357600080fd5b8063919d8fdf146102d05780639bd16333146102e3578063a1cb3ed4146102f6578063a28e6f4a14610309578063a3fb489714610312578063a4f9edbf1461032557600080fd5b80636e062eff1161014b5780638a79cadf116101255780638a79cadf146102615780638da5cb5b1461026a5780638f920e181461028f57806391775ec5146102bd57600080fd5b80636e062eff14610231578063715018a6146102465780637164dc311461024e57600080fd5b806301c4f974146101935780631f82bcb1146101c657806333eeb1471461020457806349a6a4fa1461020c578063559a24e31461021557806365d5d08c1461021e575b600080fd5b6101b36101a1366004610d4d565b606d6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101f46101d4366004610d7b565b606e60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101bd565b6101f4610393565b6101b360695481565b6101b360675481565b6101b361022c366004610e5e565b6103c7565b61024461023f366004610f0d565b610416565b005b610244610694565b6101b361025c366004610e5e565b6106a8565b6101b360685481565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101bd565b6101f461029d366004610d7b565b606f60209081526000928352604080842090915290825290205460ff1681565b6101f46102cb366004610e5e565b6106dd565b6102446102de366004610d4d565b610716565b606b54610277906001600160a01b031681565b610244610304366004610d4d565b610723565b6101b3606a5481565b606c54610277906001600160a01b031681565b610244610333366004610f42565b610730565b6102446108ba565b61024461034e366004610d4d565b610b4c565b610244610361366004610d4d565b610b59565b6101b360655481565b610244610b66565b610244610385366004610f7f565b610bce565b6101b360665481565b60006066546068541180156103b65750606a546067546103b39190610fb9565b43105b156103c15750600190565b50600090565b6000898989805190602001208989898989896040516020016103f199989796959493929190610fd1565b6040516020818303038152906040528051906020012090509998505050505050505050565b336000908152606e6020908152604080832085845290915290205460ff161561047f5760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b60448201526064015b60405180910390fd5b606c5460405163b59ee1db60e01b8152600481018490526000916001600160a01b03169063b59ee1db90602401602060405180830381865afa1580156104c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ed9190611048565b90508060000361054b5760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f7420796574206265656e207175656044820152621d595960ea1b6064820152608401610476565b606b546000906001600160a01b0316633a46b1a83361056b600186611061565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa1580156105b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d89190611048565b9050600081116105fa5760405162461bcd60e51b815260040161047690611078565b6000848152606d602052604081208054839290610618908490610fb9565b9091555050821561062b5761062b6108ba565b336000818152606e60209081526040808320888452825291829020805460ff191660011790558151848152861515918101919091528692917f3ff8c993f53ae62959a2df610fd0d5cff5320cd2a5f907e1a9f785499e402d84910160405180910390a350505050565b61069c610c47565b6106a66000610ca1565b565b6000606d60006106bf8c8c8c8c8c8c8c8c8c6103c7565b81526020019081526020016000205490509998505050505050505050565b6000606554606d60006106f78d8d8d8d8d8d8d8d8d6103c7565b8152602001908152602001600020541190509998505050505050505050565b61071e610c47565b606555565b61072b610c47565b606a55565b600054610100900460ff16158080156107505750600054600160ff909116105b8061076a5750303b15801561076a575060005460ff166001145b6107cd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610476565b6000805460ff1916600117905580156107f0576000805461ff0019166101001790555b6107f8610cf3565b60008060008060008060008880602001905181019061081791906110a3565b965096509650965096509650965061082e87610ca1565b606595909555606693909355606991909155606a55606b80546001600160a01b039283166001600160a01b031991821617909155606c80549290931691161790555080156108b6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60006069546067546108cc9190610fb9565b4311156109be57436067819055606b546001600160a01b031690633a46b1a89033906108fa90600190611061565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109679190611048565b9050600081116109895760405162461bcd60e51b815260040161047690611078565b606881905560405133907fe18d0e7e892cd73f8a648a42186da382bee61a1d78ac88401885943449f78fe490600090a2610af1565b336000908152606f60209081526040808320606754845290915290205460ff1615610a245760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b6044820152606401610476565b606b546067546001600160a01b0390911690633a46b1a8903390610a4a90600190611061565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190611048565b905060008111610ad95760405162461bcd60e51b815260040161047690611078565b8060686000828254610aeb9190610fb9565b90915550505b336000818152606f602090815260408083206067548452825291829020805460ff1916600117905590518381527f3746cafa4f96166ea7502cf76d1ea8ce440f3c8215cbcac3ae32d3ee39afae42910160405180910390a250565b610b54610c47565b606655565b610b61610c47565b606955565b610b6e610c47565b610b76610393565b610bc25760405162461bcd60e51b815260206004820152601960248201527f44414f206973206e6f7420616c72656164792066726f7a656e000000000000006044820152606401610476565b60006067819055606855565b610bd6610c47565b6001600160a01b038116610c3b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610476565b610c4481610ca1565b50565b6033546001600160a01b031633146106a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610476565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610d1a5760405162461bcd60e51b815260040161047690611118565b6106a6600054610100900460ff16610d445760405162461bcd60e51b815260040161047690611118565b6106a633610ca1565b600060208284031215610d5f57600080fd5b5035919050565b6001600160a01b0381168114610c4457600080fd5b60008060408385031215610d8e57600080fd5b8235610d9981610d66565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610dce57600080fd5b813567ffffffffffffffff80821115610de957610de9610da7565b604051601f8301601f19908116603f01168101908282118183101715610e1157610e11610da7565b81604052838152866020858801011115610e2a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560028110610e5957600080fd5b919050565b60008060008060008060008060006101208a8c031215610e7d57600080fd5b8935610e8881610d66565b985060208a0135975060408a013567ffffffffffffffff811115610eab57600080fd5b610eb78c828d01610dbd565b975050610ec660608b01610e4a565b955060808a0135945060a08a0135935060c08a0135925060e08a0135610eeb81610d66565b91506101008a0135610efc81610d66565b809150509295985092959850929598565b60008060408385031215610f2057600080fd5b8235915060208301358015158114610f3757600080fd5b809150509250929050565b600060208284031215610f5457600080fd5b813567ffffffffffffffff811115610f6b57600080fd5b610f7784828501610dbd565b949350505050565b600060208284031215610f9157600080fd5b8135610f9c81610d66565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610fcc57610fcc610fa3565b500190565b6001600160a01b038a81168252602082018a9052604082018990526101208201906002891061101057634e487b7160e01b600052602160045260246000fd5b8860608401528760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b60006020828403121561105a57600080fd5b5051919050565b60008282101561107357611073610fa3565b500390565b6020808252601190820152705573657220686173206e6f20766f74657360781b604082015260600190565b600080600080600080600060e0888a0312156110be57600080fd5b87516110c981610d66565b809750506020880151955060408801519450606088015193506080880151925060a08801516110f781610d66565b60c089015190925061110881610d66565b8091505092959891949750929550565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea264697066735822122026076cbf788af102cfd588121e4ac3c19cbf16bc04733eef69e49b1298c6436064736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018e5760003560e01c8063919d8fdf116100de578063a91e5cab11610097578063e9c17a9411610071578063e9c17a9414610366578063f21cdf6f1461036f578063f2fde38b14610377578063fb80bccc1461038a57600080fd5b8063a91e5cab14610338578063aba9dfe914610340578063e0b44b5a1461035357600080fd5b8063919d8fdf146102d05780639bd16333146102e3578063a1cb3ed4146102f6578063a28e6f4a14610309578063a3fb489714610312578063a4f9edbf1461032557600080fd5b80636e062eff1161014b5780638a79cadf116101255780638a79cadf146102615780638da5cb5b1461026a5780638f920e181461028f57806391775ec5146102bd57600080fd5b80636e062eff14610231578063715018a6146102465780637164dc311461024e57600080fd5b806301c4f974146101935780631f82bcb1146101c657806333eeb1471461020457806349a6a4fa1461020c578063559a24e31461021557806365d5d08c1461021e575b600080fd5b6101b36101a1366004610d4d565b606d6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101f46101d4366004610d7b565b606e60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101bd565b6101f4610393565b6101b360695481565b6101b360675481565b6101b361022c366004610e5e565b6103c7565b61024461023f366004610f0d565b610416565b005b610244610694565b6101b361025c366004610e5e565b6106a8565b6101b360685481565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101bd565b6101f461029d366004610d7b565b606f60209081526000928352604080842090915290825290205460ff1681565b6101f46102cb366004610e5e565b6106dd565b6102446102de366004610d4d565b610716565b606b54610277906001600160a01b031681565b610244610304366004610d4d565b610723565b6101b3606a5481565b606c54610277906001600160a01b031681565b610244610333366004610f42565b610730565b6102446108ba565b61024461034e366004610d4d565b610b4c565b610244610361366004610d4d565b610b59565b6101b360655481565b610244610b66565b610244610385366004610f7f565b610bce565b6101b360665481565b60006066546068541180156103b65750606a546067546103b39190610fb9565b43105b156103c15750600190565b50600090565b6000898989805190602001208989898989896040516020016103f199989796959493929190610fd1565b6040516020818303038152906040528051906020012090509998505050505050505050565b336000908152606e6020908152604080832085845290915290205460ff161561047f5760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b60448201526064015b60405180910390fd5b606c5460405163b59ee1db60e01b8152600481018490526000916001600160a01b03169063b59ee1db90602401602060405180830381865afa1580156104c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ed9190611048565b90508060000361054b5760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f7420796574206265656e207175656044820152621d595960ea1b6064820152608401610476565b606b546000906001600160a01b0316633a46b1a83361056b600186611061565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa1580156105b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d89190611048565b9050600081116105fa5760405162461bcd60e51b815260040161047690611078565b6000848152606d602052604081208054839290610618908490610fb9565b9091555050821561062b5761062b6108ba565b336000818152606e60209081526040808320888452825291829020805460ff191660011790558151848152861515918101919091528692917f3ff8c993f53ae62959a2df610fd0d5cff5320cd2a5f907e1a9f785499e402d84910160405180910390a350505050565b61069c610c47565b6106a66000610ca1565b565b6000606d60006106bf8c8c8c8c8c8c8c8c8c6103c7565b81526020019081526020016000205490509998505050505050505050565b6000606554606d60006106f78d8d8d8d8d8d8d8d8d6103c7565b8152602001908152602001600020541190509998505050505050505050565b61071e610c47565b606555565b61072b610c47565b606a55565b600054610100900460ff16158080156107505750600054600160ff909116105b8061076a5750303b15801561076a575060005460ff166001145b6107cd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610476565b6000805460ff1916600117905580156107f0576000805461ff0019166101001790555b6107f8610cf3565b60008060008060008060008880602001905181019061081791906110a3565b965096509650965096509650965061082e87610ca1565b606595909555606693909355606991909155606a55606b80546001600160a01b039283166001600160a01b031991821617909155606c80549290931691161790555080156108b6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60006069546067546108cc9190610fb9565b4311156109be57436067819055606b546001600160a01b031690633a46b1a89033906108fa90600190611061565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610943573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109679190611048565b9050600081116109895760405162461bcd60e51b815260040161047690611078565b606881905560405133907fe18d0e7e892cd73f8a648a42186da382bee61a1d78ac88401885943449f78fe490600090a2610af1565b336000908152606f60209081526040808320606754845290915290205460ff1615610a245760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b6044820152606401610476565b606b546067546001600160a01b0390911690633a46b1a8903390610a4a90600190611061565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190611048565b905060008111610ad95760405162461bcd60e51b815260040161047690611078565b8060686000828254610aeb9190610fb9565b90915550505b336000818152606f602090815260408083206067548452825291829020805460ff1916600117905590518381527f3746cafa4f96166ea7502cf76d1ea8ce440f3c8215cbcac3ae32d3ee39afae42910160405180910390a250565b610b54610c47565b606655565b610b61610c47565b606955565b610b6e610c47565b610b76610393565b610bc25760405162461bcd60e51b815260206004820152601960248201527f44414f206973206e6f7420616c72656164792066726f7a656e000000000000006044820152606401610476565b60006067819055606855565b610bd6610c47565b6001600160a01b038116610c3b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610476565b610c4481610ca1565b50565b6033546001600160a01b031633146106a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610476565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610d1a5760405162461bcd60e51b815260040161047690611118565b6106a6600054610100900460ff16610d445760405162461bcd60e51b815260040161047690611118565b6106a633610ca1565b600060208284031215610d5f57600080fd5b5035919050565b6001600160a01b0381168114610c4457600080fd5b60008060408385031215610d8e57600080fd5b8235610d9981610d66565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610dce57600080fd5b813567ffffffffffffffff80821115610de957610de9610da7565b604051601f8301601f19908116603f01168101908282118183101715610e1157610e11610da7565b81604052838152866020858801011115610e2a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560028110610e5957600080fd5b919050565b60008060008060008060008060006101208a8c031215610e7d57600080fd5b8935610e8881610d66565b985060208a0135975060408a013567ffffffffffffffff811115610eab57600080fd5b610eb78c828d01610dbd565b975050610ec660608b01610e4a565b955060808a0135945060a08a0135935060c08a0135925060e08a0135610eeb81610d66565b91506101008a0135610efc81610d66565b809150509295985092959850929598565b60008060408385031215610f2057600080fd5b8235915060208301358015158114610f3757600080fd5b809150509250929050565b600060208284031215610f5457600080fd5b813567ffffffffffffffff811115610f6b57600080fd5b610f7784828501610dbd565b949350505050565b600060208284031215610f9157600080fd5b8135610f9c81610d66565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610fcc57610fcc610fa3565b500190565b6001600160a01b038a81168252602082018a9052604082018990526101208201906002891061101057634e487b7160e01b600052602160045260246000fd5b8860608401528760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b60006020828403121561105a57600080fd5b5051919050565b60008282101561107357611073610fa3565b500390565b6020808252601190820152705573657220686173206e6f20766f74657360781b604082015260600190565b600080600080600080600060e0888a0312156110be57600080fd5b87516110c981610d66565b809750506020880151955060408801519450606088015193506080880151925060a08801516110f781610d66565b60c089015190925061110881610d66565b8091505092959891949750929550565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea264697066735822122026076cbf788af102cfd588121e4ac3c19cbf16bc04733eef69e49b1298c6436064736f6c634300080d0033", + "solcInputHash": "b2fc18a2e663b1410a34647a57a06e84", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"FreezeProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votesCast\",\"type\":\"uint256\"}],\"name\":\"FreezeVoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transactionHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votesCast\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"freeze\",\"type\":\"bool\"}],\"name\":\"VetoVoteCast\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"castFreezeVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_transactionHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_freeze\",\"type\":\"bool\"}],\"name\":\"castVetoVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defrost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeBlockDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalBlockDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalCreatedBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalVoteCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeVotesThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_transactionHash\",\"type\":\"bytes32\"}],\"name\":\"getIsVetoed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"}],\"name\":\"getTransactionHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transactionVetoVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeBlockDuration\",\"type\":\"uint256\"}],\"name\":\"updateFreezeBlockDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeProposalBlockDuration\",\"type\":\"uint256\"}],\"name\":\"updateFreezeProposalBlockDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeVotesThreshold\",\"type\":\"uint256\"}],\"name\":\"updateFreezeVotesThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vetoVotesThreshold\",\"type\":\"uint256\"}],\"name\":\"updateVetoVotesThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"userHasFreezeVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"userHasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vetoGuard\",\"outputs\":[{\"internalType\":\"contract IVetoGuard\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vetoVotesThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votesToken\",\"outputs\":[{\"internalType\":\"contract IVotes\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"castVetoVote(bytes32,bool)\":{\"params\":{\"_freeze\":\"Bool indicating whether the voter thinks the DAO should also be frozen\",\"_transactionHash\":\"The hash of the transaction data\"}},\"getIsVetoed(bytes32)\":{\"params\":{\"_transactionHash\":\"The hash of the transaction data\"},\"returns\":{\"_0\":\"bool True if the transaction is vetoed\"}},\"getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"details\":\"Returns the hash of all the transaction dataIt is important to note that this implementation is different than that in the Gnosis Safe contractThis implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interfaceThis implementation also omits the EIP-712 related values, since these hashes are not being signed by users\",\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"},\"returns\":{\"_0\":\"Transaction hash bytes.\"}},\"isFrozen()\":{\"returns\":{\"_0\":\"bool Indicates whether the DAO is currently frozen\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateFreezeBlockDuration(uint256)\":{\"params\":{\"_freezeBlockDuration\":\"The number of blocks a freeze last, from time of freeze proposal creation\"}},\"updateFreezeProposalBlockDuration(uint256)\":{\"params\":{\"_freezeProposalBlockDuration\":\"The number of blocks a freeze proposal has to succeed\"}},\"updateFreezeVotesThreshold(uint256)\":{\"params\":{\"_freezeVotesThreshold\":\"Number of freeze votes required to activate a freeze\"}},\"updateVetoVotesThreshold(uint256)\":{\"params\":{\"_vetoVotesThreshold\":\"The number of votes required to veto a transaction\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"castFreezeVote()\":{\"notice\":\"Allows user to cast a freeze vote, creating a freeze proposal if necessary\"},\"castVetoVote(bytes32,bool)\":{\"notice\":\"Allows the msg.sender to cast veto and freeze votes on the specified transaction\"},\"defrost()\":{\"notice\":\"Unfreezes the DAO, only callable by the owner\"},\"getIsVetoed(bytes32)\":{\"notice\":\"Returns whether the specified transaction has been vetoed\"},\"isFrozen()\":{\"notice\":\"Returns true if the DAO is currently frozen, false otherwise\"},\"setUp(bytes)\":{\"notice\":\"Initialize function, will be triggered when a new proxy is deployed\"},\"updateFreezeBlockDuration(uint256)\":{\"notice\":\"Updates the freeze block duration, only callable by the owner\"},\"updateFreezeProposalBlockDuration(uint256)\":{\"notice\":\"Updates the freeze proposal blocks duration, only callable by the owner\"},\"updateFreezeVotesThreshold(uint256)\":{\"notice\":\"Updates the freeze votes threshold, only callable by the owner\"},\"updateVetoVotesThreshold(uint256)\":{\"notice\":\"Updates the veto votes threshold, only callable by the owner\"}},\"notice\":\"A contract for casting veto votes with an ERC20 votes token\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/VetoERC20Voting.sol\":\"VetoERC20Voting\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"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/governance/utils/IVotes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 IVotes {\\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 the end of a past block (`blockNumber`).\\n */\\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\\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 blockNumber) 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(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0xf5324a55ee9c0b4a840ea57c055ac9d046f88986ceef567e1cf68113e46a79c0\",\"license\":\"MIT\"},\"contracts/TransactionHasher.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\nabstract contract TransactionHasher {\\r\\n /// @dev Returns the hash of all the transaction data\\r\\n /// @dev It is important to note that this implementation is different than that in the Gnosis Safe contract\\r\\n /// @dev This implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interface\\r\\n /// @dev This implementation also omits the EIP-712 related values, since these hashes are not being signed by users\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return Transaction hash bytes.\\r\\n function getTransactionHash(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address refundReceiver\\r\\n ) public pure returns (bytes32) {\\r\\n return keccak256(\\r\\n abi.encode(\\r\\n to,\\r\\n value,\\r\\n keccak256(data),\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n )\\r\\n );\\r\\n }\\r\\n}\",\"keccak256\":\"0x1d6ca309cc27debd165993a3929e3bdd0de8eb3c3eff79e86479ce4e2955e16d\",\"license\":\"Unlicense\"},\"contracts/VetoERC20Voting.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/IVetoGuard.sol\\\";\\r\\nimport \\\"./interfaces/IVetoVoting.sol\\\";\\r\\nimport \\\"./TransactionHasher.sol\\\";\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/governance/utils/IVotes.sol\\\";\\r\\n\\r\\n/// @notice A contract for casting veto votes with an ERC20 votes token\\r\\ncontract VetoERC20Voting is IVetoVoting, TransactionHasher, FactoryFriendly {\\r\\n uint256 public vetoVotesThreshold; // Number of votes required to veto a transaction\\r\\n uint256 public freezeVotesThreshold; // Number of freeze votes required to activate a freeze\\r\\n uint256 public freezeProposalCreatedBlock; // Block number the freeze proposal was created at\\r\\n uint256 public freezeProposalVoteCount; // Number of accrued freeze votes\\r\\n uint256 public freezeProposalBlockDuration; // Number of blocks a freeze proposal has to succeed\\r\\n uint256 public freezeBlockDuration; // Number of blocks a freeze last, from time of freeze proposal creation\\r\\n IVotes public votesToken;\\r\\n IVetoGuard public vetoGuard;\\r\\n mapping(bytes32 => uint256) public transactionVetoVotes;\\r\\n mapping(address => mapping(bytes32 => bool)) public userHasVoted;\\r\\n mapping(address => mapping(uint256 => bool)) public userHasFreezeVoted;\\r\\n\\r\\n /// @notice Initialize function, will be triggered when a new proxy is deployed\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n __Ownable_init();\\r\\n (\\r\\n address _owner,\\r\\n uint256 _vetoVotesThreshold,\\r\\n uint256 _freezeVotesThreshold,\\r\\n uint256 _freezeProposalBlockDuration,\\r\\n uint256 _freezeBlockDuration,\\r\\n address _votesToken,\\r\\n address _vetoGuard\\r\\n ) = abi.decode(\\r\\n initializeParams,\\r\\n (address, uint256, uint256, uint256, uint256, address, address)\\r\\n );\\r\\n\\r\\n _transferOwnership(_owner);\\r\\n vetoVotesThreshold = _vetoVotesThreshold;\\r\\n freezeVotesThreshold = _freezeVotesThreshold;\\r\\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\\r\\n freezeBlockDuration = _freezeBlockDuration;\\r\\n votesToken = IVotes(_votesToken);\\r\\n vetoGuard = IVetoGuard(_vetoGuard);\\r\\n }\\r\\n\\r\\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\\r\\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external {\\r\\n // Check that user has not yet voted\\r\\n require(\\r\\n !userHasVoted[msg.sender][_transactionHash],\\r\\n \\\"User has already voted\\\"\\r\\n );\\r\\n\\r\\n // Get the block number the transaction was queued on the VetoGuard\\r\\n uint256 queuedBlockNumber = vetoGuard.getTransactionQueuedBlock(\\r\\n _transactionHash\\r\\n );\\r\\n\\r\\n // Check that the transaction has been queued\\r\\n require(queuedBlockNumber != 0, \\\"Transaction has not yet been queued\\\");\\r\\n\\r\\n uint256 vetoVotes = votesToken.getPastVotes(\\r\\n msg.sender,\\r\\n queuedBlockNumber - 1\\r\\n );\\r\\n\\r\\n require(vetoVotes > 0, \\\"User has no votes\\\");\\r\\n\\r\\n // Add the user votes to the veto vote count for this transaction\\r\\n transactionVetoVotes[_transactionHash] += vetoVotes;\\r\\n\\r\\n // If the user is voting to freeze, count that vote as well\\r\\n if (_freeze) {\\r\\n castFreezeVote();\\r\\n }\\r\\n\\r\\n // User has voted\\r\\n userHasVoted[msg.sender][_transactionHash] = true;\\r\\n\\r\\n emit VetoVoteCast(msg.sender, _transactionHash, vetoVotes, _freeze);\\r\\n }\\r\\n\\r\\n /// @notice Allows user to cast a freeze vote, creating a freeze proposal if necessary\\r\\n function castFreezeVote() public {\\r\\n uint256 userVotes;\\r\\n\\r\\n if (\\r\\n block.number >\\r\\n freezeProposalCreatedBlock + freezeProposalBlockDuration\\r\\n ) {\\r\\n // Create freeze proposal, set total votes to msg.sender's vote count\\r\\n freezeProposalCreatedBlock = block.number;\\r\\n\\r\\n userVotes = votesToken.getPastVotes(\\r\\n msg.sender,\\r\\n freezeProposalCreatedBlock - 1\\r\\n );\\r\\n require(userVotes > 0, \\\"User has no votes\\\");\\r\\n\\r\\n freezeProposalVoteCount = userVotes;\\r\\n\\r\\n emit FreezeProposalCreated(msg.sender);\\r\\n } else {\\r\\n // There is an existing freeze proposal, count user's votes\\r\\n require(\\r\\n !userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock],\\r\\n \\\"User has already voted\\\"\\r\\n );\\r\\n\\r\\n userVotes = votesToken.getPastVotes(\\r\\n msg.sender,\\r\\n freezeProposalCreatedBlock - 1\\r\\n );\\r\\n require(userVotes > 0, \\\"User has no votes\\\");\\r\\n\\r\\n freezeProposalVoteCount += userVotes;\\r\\n }\\r\\n\\r\\n userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock] = true;\\r\\n\\r\\n emit FreezeVoteCast(msg.sender, userVotes);\\r\\n }\\r\\n\\r\\n /// @notice Unfreezes the DAO, only callable by the owner\\r\\n function defrost() public onlyOwner {\\r\\n freezeProposalCreatedBlock = 0;\\r\\n freezeProposalVoteCount = 0;\\r\\n }\\r\\n\\r\\n /// @notice Updates the veto votes threshold, only callable by the owner\\r\\n /// @param _vetoVotesThreshold The number of votes required to veto a transaction\\r\\n function updateVetoVotesThreshold(uint256 _vetoVotesThreshold)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n vetoVotesThreshold = _vetoVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze votes threshold, only callable by the owner\\r\\n /// @param _freezeVotesThreshold Number of freeze votes required to activate a freeze\\r\\n function updateFreezeVotesThreshold(uint256 _freezeVotesThreshold)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n freezeVotesThreshold = _freezeVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze proposal blocks duration, only callable by the owner\\r\\n /// @param _freezeProposalBlockDuration The number of blocks a freeze proposal has to succeed\\r\\n function updateFreezeProposalBlockDuration(\\r\\n uint256 _freezeProposalBlockDuration\\r\\n ) external onlyOwner {\\r\\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze block duration, only callable by the owner\\r\\n /// @param _freezeBlockDuration The number of blocks a freeze last, from time of freeze proposal creation\\r\\n function updateFreezeBlockDuration(uint256 _freezeBlockDuration)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n freezeBlockDuration = _freezeBlockDuration;\\r\\n }\\r\\n\\r\\n /// @notice Returns whether the specified transaction has been vetoed\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return bool True if the transaction is vetoed\\r\\n function getIsVetoed(bytes32 _transactionHash)\\r\\n external\\r\\n view\\r\\n returns (bool)\\r\\n {\\r\\n return transactionVetoVotes[_transactionHash] > vetoVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Returns true if the DAO is currently frozen, false otherwise\\r\\n /// @return bool Indicates whether the DAO is currently frozen\\r\\n function isFrozen() public view returns (bool) {\\r\\n if (\\r\\n freezeProposalVoteCount > freezeVotesThreshold &&\\r\\n block.number < freezeProposalCreatedBlock + freezeBlockDuration\\r\\n ) {\\r\\n return true;\\r\\n }\\r\\n\\r\\n return false;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x1052284975fbc4fc41447741cd1a6e7b848f42f9919c55158f831d41fa789d1c\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoGuard {\\r\\n event VetoGuardSetup(\\r\\n address creator,\\r\\n uint256 executionDelayBlocks,\\r\\n address indexed owner,\\r\\n address indexed vetoERC20Voting\\r\\n );\\r\\n\\r\\n event TransactionQueued(\\r\\n address indexed queuer,\\r\\n bytes32 indexed transactionHash,\\r\\n bytes indexed signatures\\r\\n );\\r\\n\\r\\n /// @notice Allows a user to queue the transaction, requires valid signatures\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\r\\n function queueTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external;\\r\\n\\r\\n /// @notice Updates the execution delay blocks\\r\\n /// @param _executionDelayBlocks The number of blocks between when a transaction is queued and can be executed\\r\\n function updateExecutionDelayBlocks(\\r\\n uint256 _executionDelayBlocks\\r\\n ) external;\\r\\n\\r\\n /// @notice Gets the block number that the transaction was queued at\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return uint256 The block number\\r\\n function getTransactionQueuedBlock(bytes32 _transactionHash)\\r\\n external\\r\\n view\\r\\n returns (uint256);\\r\\n}\\r\\n\",\"keccak256\":\"0x0b11f06f35570cc8ea2ba2c4247fb87f20b5adfa6d55a2dc25c4e3ef981130ad\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoVoting.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoVoting {\\r\\n event VetoVoteCast(\\r\\n address indexed voter,\\r\\n bytes32 indexed transactionHash,\\r\\n uint256 votesCast,\\r\\n bool freeze\\r\\n );\\r\\n\\r\\n event FreezeVoteCast(address indexed voter, uint256 votesCast);\\r\\n\\r\\n event FreezeProposalCreated(address indexed creator);\\r\\n\\r\\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\\r\\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external;\\r\\n\\r\\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\\r\\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\\r\\n function castFreezeVote() external;\\r\\n\\r\\n /// @notice Returns whether the specified transaction has been vetoed\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return bool True if the transaction is vetoed\\r\\n function getIsVetoed(bytes32 _transactionHash) external view returns (bool);\\r\\n\\r\\n /// @notice Returns true if the DAO is currently frozen, false otherwise\\r\\n /// @return bool Indicates whether the DAO is currently frozen\\r\\n function isFrozen() external view returns (bool);\\r\\n}\\r\\n\",\"keccak256\":\"0x13e262efc0a67242c311292283d8c93c3783536a8bb24ae9a240c4757874a5b9\",\"license\":\"Unlicense\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506110b9806100206000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80639bd16333116100de578063aba9dfe911610097578063e9c17a9411610071578063e9c17a941461034a578063f21cdf6f14610353578063f2fde38b1461035b578063fb80bccc1461036e57600080fd5b8063aba9dfe9146102ff578063e0b44b5a14610312578063e1a411521461032557600080fd5b80639bd16333146102a2578063a1cb3ed4146102b5578063a28e6f4a146102c8578063a3fb4897146102d1578063a4f9edbf146102e4578063a91e5cab146102f757600080fd5b80636e062eff116101305780636e062eff14610216578063715018a61461022b5780638a79cadf146102335780638da5cb5b1461023c5780638f920e1814610261578063919d8fdf1461028f57600080fd5b806301c4f974146101785780631f82bcb1146101ab57806333eeb147146101e957806349a6a4fa146101f1578063559a24e3146101fa57806365d5d08c14610203575b600080fd5b610198610186366004610c6f565b606d6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101d96101b9366004610cad565b606e60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101a2565b6101d9610377565b61019860695481565b61019860675481565b610198610211366004610d7c565b6103ab565b610229610224366004610e2d565b6103fa565b005b610229610678565b61019860685481565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101a2565b6101d961026f366004610cad565b606f60209081526000928352604080842090915290825290205460ff1681565b61022961029d366004610c6f565b61068c565b606b54610249906001600160a01b031681565b6102296102c3366004610c6f565b610699565b610198606a5481565b606c54610249906001600160a01b031681565b6102296102f2366004610e62565b6106a6565b610229610830565b61022961030d366004610c6f565b610ac2565b610229610320366004610c6f565b610acf565b6101d9610333366004610c6f565b6065546000918252606d6020526040909120541190565b61019860655481565b610229610adc565b610229610369366004610e9f565b610af0565b61019860665481565b600060665460685411801561039a5750606a546067546103979190610ed9565b43105b156103a55750600190565b50600090565b6000898989805190602001208989898989896040516020016103d599989796959493929190610ef1565b6040516020818303038152906040528051906020012090509998505050505050505050565b336000908152606e6020908152604080832085845290915290205460ff16156104635760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b60448201526064015b60405180910390fd5b606c5460405163b59ee1db60e01b8152600481018490526000916001600160a01b03169063b59ee1db90602401602060405180830381865afa1580156104ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d19190610f68565b90508060000361052f5760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f7420796574206265656e207175656044820152621d595960ea1b606482015260840161045a565b606b546000906001600160a01b0316633a46b1a83361054f600186610f81565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610598573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bc9190610f68565b9050600081116105de5760405162461bcd60e51b815260040161045a90610f98565b6000848152606d6020526040812080548392906105fc908490610ed9565b9091555050821561060f5761060f610830565b336000818152606e60209081526040808320888452825291829020805460ff191660011790558151848152861515918101919091528692917f3ff8c993f53ae62959a2df610fd0d5cff5320cd2a5f907e1a9f785499e402d84910160405180910390a350505050565b610680610b69565b61068a6000610bc3565b565b610694610b69565b606555565b6106a1610b69565b606a55565b600054610100900460ff16158080156106c65750600054600160ff909116105b806106e05750303b1580156106e0575060005460ff166001145b6107435760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161045a565b6000805460ff191660011790558015610766576000805461ff0019166101001790555b61076e610c15565b60008060008060008060008880602001905181019061078d9190610fc3565b96509650965096509650965096506107a487610bc3565b606595909555606693909355606991909155606a55606b80546001600160a01b039283166001600160a01b031991821617909155606c805492909316911617905550801561082c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60006069546067546108429190610ed9565b43111561093457436067819055606b546001600160a01b031690633a46b1a890339061087090600190610f81565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa1580156108b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190610f68565b9050600081116108ff5760405162461bcd60e51b815260040161045a90610f98565b606881905560405133907fe18d0e7e892cd73f8a648a42186da382bee61a1d78ac88401885943449f78fe490600090a2610a67565b336000908152606f60209081526040808320606754845290915290205460ff161561099a5760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b604482015260640161045a565b606b546067546001600160a01b0390911690633a46b1a89033906109c090600190610f81565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610a09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2d9190610f68565b905060008111610a4f5760405162461bcd60e51b815260040161045a90610f98565b8060686000828254610a619190610ed9565b90915550505b336000818152606f602090815260408083206067548452825291829020805460ff1916600117905590518381527f3746cafa4f96166ea7502cf76d1ea8ce440f3c8215cbcac3ae32d3ee39afae42910160405180910390a250565b610aca610b69565b606655565b610ad7610b69565b606955565b610ae4610b69565b60006067819055606855565b610af8610b69565b6001600160a01b038116610b5d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045a565b610b6681610bc3565b50565b6033546001600160a01b0316331461068a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045a565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610c3c5760405162461bcd60e51b815260040161045a90611038565b61068a600054610100900460ff16610c665760405162461bcd60e51b815260040161045a90611038565b61068a33610bc3565b600060208284031215610c8157600080fd5b5035919050565b6001600160a01b0381168114610b6657600080fd5b8035610ca881610c88565b919050565b60008060408385031215610cc057600080fd5b8235610ccb81610c88565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610d0057600080fd5b813567ffffffffffffffff80821115610d1b57610d1b610cd9565b604051601f8301601f19908116603f01168101908282118183101715610d4357610d43610cd9565b81604052838152866020858801011115610d5c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060008060006101208a8c031215610d9b57600080fd5b8935610da681610c88565b985060208a0135975060408a013567ffffffffffffffff811115610dc957600080fd5b610dd58c828d01610cef565b97505060608a013560028110610dea57600080fd5b955060808a0135945060a08a0135935060c08a0135925060e08a0135610e0f81610c88565b9150610e1e6101008b01610c9d565b90509295985092959850929598565b60008060408385031215610e4057600080fd5b8235915060208301358015158114610e5757600080fd5b809150509250929050565b600060208284031215610e7457600080fd5b813567ffffffffffffffff811115610e8b57600080fd5b610e9784828501610cef565b949350505050565b600060208284031215610eb157600080fd5b8135610ebc81610c88565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610eec57610eec610ec3565b500190565b6001600160a01b038a81168252602082018a90526040820189905261012082019060028910610f3057634e487b7160e01b600052602160045260246000fd5b8860608401528760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b600060208284031215610f7a57600080fd5b5051919050565b600082821015610f9357610f93610ec3565b500390565b6020808252601190820152705573657220686173206e6f20766f74657360781b604082015260600190565b600080600080600080600060e0888a031215610fde57600080fd5b8751610fe981610c88565b809750506020880151955060408801519450606088015193506080880151925060a088015161101781610c88565b60c089015190925061102881610c88565b8091505092959891949750929550565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212205ed56c6110628ed6a6d82a8b91b71413712de8585cf23283080aab7a4157bc8764736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c80639bd16333116100de578063aba9dfe911610097578063e9c17a9411610071578063e9c17a941461034a578063f21cdf6f14610353578063f2fde38b1461035b578063fb80bccc1461036e57600080fd5b8063aba9dfe9146102ff578063e0b44b5a14610312578063e1a411521461032557600080fd5b80639bd16333146102a2578063a1cb3ed4146102b5578063a28e6f4a146102c8578063a3fb4897146102d1578063a4f9edbf146102e4578063a91e5cab146102f757600080fd5b80636e062eff116101305780636e062eff14610216578063715018a61461022b5780638a79cadf146102335780638da5cb5b1461023c5780638f920e1814610261578063919d8fdf1461028f57600080fd5b806301c4f974146101785780631f82bcb1146101ab57806333eeb147146101e957806349a6a4fa146101f1578063559a24e3146101fa57806365d5d08c14610203575b600080fd5b610198610186366004610c6f565b606d6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101d96101b9366004610cad565b606e60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101a2565b6101d9610377565b61019860695481565b61019860675481565b610198610211366004610d7c565b6103ab565b610229610224366004610e2d565b6103fa565b005b610229610678565b61019860685481565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101a2565b6101d961026f366004610cad565b606f60209081526000928352604080842090915290825290205460ff1681565b61022961029d366004610c6f565b61068c565b606b54610249906001600160a01b031681565b6102296102c3366004610c6f565b610699565b610198606a5481565b606c54610249906001600160a01b031681565b6102296102f2366004610e62565b6106a6565b610229610830565b61022961030d366004610c6f565b610ac2565b610229610320366004610c6f565b610acf565b6101d9610333366004610c6f565b6065546000918252606d6020526040909120541190565b61019860655481565b610229610adc565b610229610369366004610e9f565b610af0565b61019860665481565b600060665460685411801561039a5750606a546067546103979190610ed9565b43105b156103a55750600190565b50600090565b6000898989805190602001208989898989896040516020016103d599989796959493929190610ef1565b6040516020818303038152906040528051906020012090509998505050505050505050565b336000908152606e6020908152604080832085845290915290205460ff16156104635760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b60448201526064015b60405180910390fd5b606c5460405163b59ee1db60e01b8152600481018490526000916001600160a01b03169063b59ee1db90602401602060405180830381865afa1580156104ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d19190610f68565b90508060000361052f5760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f7420796574206265656e207175656044820152621d595960ea1b606482015260840161045a565b606b546000906001600160a01b0316633a46b1a83361054f600186610f81565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610598573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bc9190610f68565b9050600081116105de5760405162461bcd60e51b815260040161045a90610f98565b6000848152606d6020526040812080548392906105fc908490610ed9565b9091555050821561060f5761060f610830565b336000818152606e60209081526040808320888452825291829020805460ff191660011790558151848152861515918101919091528692917f3ff8c993f53ae62959a2df610fd0d5cff5320cd2a5f907e1a9f785499e402d84910160405180910390a350505050565b610680610b69565b61068a6000610bc3565b565b610694610b69565b606555565b6106a1610b69565b606a55565b600054610100900460ff16158080156106c65750600054600160ff909116105b806106e05750303b1580156106e0575060005460ff166001145b6107435760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161045a565b6000805460ff191660011790558015610766576000805461ff0019166101001790555b61076e610c15565b60008060008060008060008880602001905181019061078d9190610fc3565b96509650965096509650965096506107a487610bc3565b606595909555606693909355606991909155606a55606b80546001600160a01b039283166001600160a01b031991821617909155606c805492909316911617905550801561082c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60006069546067546108429190610ed9565b43111561093457436067819055606b546001600160a01b031690633a46b1a890339061087090600190610f81565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa1580156108b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190610f68565b9050600081116108ff5760405162461bcd60e51b815260040161045a90610f98565b606881905560405133907fe18d0e7e892cd73f8a648a42186da382bee61a1d78ac88401885943449f78fe490600090a2610a67565b336000908152606f60209081526040808320606754845290915290205460ff161561099a5760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b604482015260640161045a565b606b546067546001600160a01b0390911690633a46b1a89033906109c090600190610f81565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610a09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2d9190610f68565b905060008111610a4f5760405162461bcd60e51b815260040161045a90610f98565b8060686000828254610a619190610ed9565b90915550505b336000818152606f602090815260408083206067548452825291829020805460ff1916600117905590518381527f3746cafa4f96166ea7502cf76d1ea8ce440f3c8215cbcac3ae32d3ee39afae42910160405180910390a250565b610aca610b69565b606655565b610ad7610b69565b606955565b610ae4610b69565b60006067819055606855565b610af8610b69565b6001600160a01b038116610b5d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045a565b610b6681610bc3565b50565b6033546001600160a01b0316331461068a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045a565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610c3c5760405162461bcd60e51b815260040161045a90611038565b61068a600054610100900460ff16610c665760405162461bcd60e51b815260040161045a90611038565b61068a33610bc3565b600060208284031215610c8157600080fd5b5035919050565b6001600160a01b0381168114610b6657600080fd5b8035610ca881610c88565b919050565b60008060408385031215610cc057600080fd5b8235610ccb81610c88565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610d0057600080fd5b813567ffffffffffffffff80821115610d1b57610d1b610cd9565b604051601f8301601f19908116603f01168101908282118183101715610d4357610d43610cd9565b81604052838152866020858801011115610d5c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060008060006101208a8c031215610d9b57600080fd5b8935610da681610c88565b985060208a0135975060408a013567ffffffffffffffff811115610dc957600080fd5b610dd58c828d01610cef565b97505060608a013560028110610dea57600080fd5b955060808a0135945060a08a0135935060c08a0135925060e08a0135610e0f81610c88565b9150610e1e6101008b01610c9d565b90509295985092959850929598565b60008060408385031215610e4057600080fd5b8235915060208301358015158114610e5757600080fd5b809150509250929050565b600060208284031215610e7457600080fd5b813567ffffffffffffffff811115610e8b57600080fd5b610e9784828501610cef565b949350505050565b600060208284031215610eb157600080fd5b8135610ebc81610c88565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610eec57610eec610ec3565b500190565b6001600160a01b038a81168252602082018a90526040820189905261012082019060028910610f3057634e487b7160e01b600052602160045260246000fd5b8860608401528760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b600060208284031215610f7a57600080fd5b5051919050565b600082821015610f9357610f93610ec3565b500390565b6020808252601190820152705573657220686173206e6f20766f74657360781b604082015260600190565b600080600080600080600060e0888a031215610fde57600080fd5b8751610fe981610c88565b809750506020880151955060408801519450606088015193506080880151925060a088015161101781610c88565b60c089015190925061102881610c88565b8091505092959891949750929550565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212205ed56c6110628ed6a6d82a8b91b71413712de8585cf23283080aab7a4157bc8764736f6c634300080d0033", "devdoc": { "kind": "dev", "methods": { @@ -619,17 +520,9 @@ "_transactionHash": "The hash of the transaction data" } }, - "getIsVetoed(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)": { + "getIsVetoed(bytes32)": { "params": { - "baseGas": "Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)", - "data": "Data payload.", - "gasPrice": "Maximum gas price that should be used for this transaction.", - "gasToken": "Token address (or 0 if ETH) that is used for the payment.", - "operation": "Operation type.", - "refundReceiver": "Address of receiver of gas payment (or 0 if tx.origin).", - "safeTxGas": "Gas that should be used for the safe transaction.", - "to": "Destination address.", - "value": "Ether value." + "_transactionHash": "The hash of the transaction data" }, "returns": { "_0": "bool True if the transaction is vetoed" @@ -652,22 +545,6 @@ "_0": "Transaction hash bytes." } }, - "getVetoVotes(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)": { - "params": { - "baseGas": "Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)", - "data": "Data payload.", - "gasPrice": "Maximum gas price that should be used for this transaction.", - "gasToken": "Token address (or 0 if ETH) that is used for the payment.", - "operation": "Operation type.", - "refundReceiver": "Address of receiver of gas payment (or 0 if tx.origin).", - "safeTxGas": "Gas that should be used for the safe transaction.", - "to": "Destination address.", - "value": "Ether value." - }, - "returns": { - "_0": "uint256 The number of veto votes that have been cast" - } - }, "isFrozen()": { "returns": { "_0": "bool Indicates whether the DAO is currently frozen" @@ -714,7 +591,7 @@ "kind": "user", "methods": { "castFreezeVote()": { - "notice": "Allows a user to cast a freeze vote if there is an active freeze proposalIf there isn't an active freeze proposal, it is created and the user's votes are cast" + "notice": "Allows user to cast a freeze vote, creating a freeze proposal if necessary" }, "castVetoVote(bytes32,bool)": { "notice": "Allows the msg.sender to cast veto and freeze votes on the specified transaction" @@ -722,14 +599,11 @@ "defrost()": { "notice": "Unfreezes the DAO, only callable by the owner" }, - "getIsVetoed(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)": { + "getIsVetoed(bytes32)": { "notice": "Returns whether the specified transaction has been vetoed" }, - "getVetoVotes(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)": { - "notice": "Returns the number of votes that have been cast to veto the specified transaction" - }, "isFrozen()": { - "notice": "Returns true if the DAO is currently frozen" + "notice": "Returns true if the DAO is currently frozen, false otherwise" }, "setUp(bytes)": { "notice": "Initialize function, will be triggered when a new proxy is deployed" @@ -753,7 +627,7 @@ "storageLayout": { "storage": [ { - "astId": 661, + "astId": 3006, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "_initialized", "offset": 0, @@ -761,7 +635,7 @@ "type": "t_uint8" }, { - "astId": 664, + "astId": 3009, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "_initializing", "offset": 1, @@ -769,7 +643,7 @@ "type": "t_bool" }, { - "astId": 1089, + "astId": 5465, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "__gap", "offset": 0, @@ -777,7 +651,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 533, + "astId": 2800, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "_owner", "offset": 0, @@ -785,7 +659,7 @@ "type": "t_address" }, { - "astId": 653, + "astId": 2920, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "__gap", "offset": 0, @@ -793,7 +667,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 8563, + "astId": 10043, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "vetoVotesThreshold", "offset": 0, @@ -801,7 +675,7 @@ "type": "t_uint256" }, { - "astId": 8565, + "astId": 10045, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "freezeVotesThreshold", "offset": 0, @@ -809,7 +683,7 @@ "type": "t_uint256" }, { - "astId": 8567, + "astId": 10047, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "freezeProposalCreatedBlock", "offset": 0, @@ -817,7 +691,7 @@ "type": "t_uint256" }, { - "astId": 8569, + "astId": 10049, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "freezeProposalVoteCount", "offset": 0, @@ -825,7 +699,7 @@ "type": "t_uint256" }, { - "astId": 8571, + "astId": 10051, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "freezeProposalBlockDuration", "offset": 0, @@ -833,7 +707,7 @@ "type": "t_uint256" }, { - "astId": 8573, + "astId": 10053, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "freezeBlockDuration", "offset": 0, @@ -841,23 +715,23 @@ "type": "t_uint256" }, { - "astId": 8576, + "astId": 10056, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "votesToken", "offset": 0, "slot": "107", - "type": "t_contract(IVotes)1168" + "type": "t_contract(IVotes)8737" }, { - "astId": 8579, + "astId": 10059, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "vetoGuard", "offset": 0, "slot": "108", - "type": "t_contract(IVetoGuard)9858" + "type": "t_contract(IVetoGuard)11584" }, { - "astId": 8583, + "astId": 10063, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "transactionVetoVotes", "offset": 0, @@ -865,7 +739,7 @@ "type": "t_mapping(t_bytes32,t_uint256)" }, { - "astId": 8589, + "astId": 10069, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "userHasVoted", "offset": 0, @@ -873,7 +747,7 @@ "type": "t_mapping(t_address,t_mapping(t_bytes32,t_bool))" }, { - "astId": 8595, + "astId": 10075, "contract": "contracts/VetoERC20Voting.sol:VetoERC20Voting", "label": "userHasFreezeVoted", "offset": 0, @@ -909,12 +783,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IVetoGuard)9858": { + "t_contract(IVetoGuard)11584": { "encoding": "inplace", "label": "contract IVetoGuard", "numberOfBytes": "20" }, - "t_contract(IVotes)1168": { + "t_contract(IVotes)8737": { "encoding": "inplace", "label": "contract IVotes", "numberOfBytes": "20" diff --git a/deployments/goerli/VetoGuard.json b/deployments/goerli/VetoGuard.json index 24a043ff..c1374d46 100644 --- a/deployments/goerli/VetoGuard.json +++ b/deployments/goerli/VetoGuard.json @@ -1,5 +1,5 @@ { - "address": "0x36e6aC796ac44d3Ee21314661C3dAa2C344076A9", + "address": "0xD0A464941d7443Ef90ce310082d6b1f7d50bc288", "abi": [ { "anonymous": false, @@ -397,12 +397,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_executionDelayBlocks", + "type": "uint256" + } + ], + "name": "updateExecutionDelayBlocks", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], - "name": "vetoERC20Voting", + "name": "vetoVoting", "outputs": [ { - "internalType": "contract IVetoERC20Voting", + "internalType": "contract IVetoVoting", "name": "", "type": "address" } @@ -411,28 +424,28 @@ "type": "function" } ], - "transactionHash": "0xd54125d07eaa106e64bd0b9f0c099241366db443cb1264b2bd857aa7627fbcbd", + "transactionHash": "0x040a1914311c87325b9dc7b513754a153bc110049c2c4528919128d419d33a22", "receipt": { "to": null, "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", - "contractAddress": "0x36e6aC796ac44d3Ee21314661C3dAa2C344076A9", - "transactionIndex": 24, - "gasUsed": "1096209", + "contractAddress": "0xD0A464941d7443Ef90ce310082d6b1f7d50bc288", + "transactionIndex": 32, + "gasUsed": "1084142", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x24465cf995ccbf3a83b8ea237ad78bdfde6fc8736f00164088befd77c7a585af", - "transactionHash": "0xd54125d07eaa106e64bd0b9f0c099241366db443cb1264b2bd857aa7627fbcbd", + "blockHash": "0xedb1a3275680e67ea4c76711c33f8ec09580ad08c4d5133a498df5d89fb650d3", + "transactionHash": "0x040a1914311c87325b9dc7b513754a153bc110049c2c4528919128d419d33a22", "logs": [], - "blockNumber": 7752445, - "cumulativeGasUsed": "11535655", + "blockNumber": 7804430, + "cumulativeGasUsed": "5672853", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "45f7710f616c39a15b2c4779b7f6d0c2", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"queuer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transactionHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"TransactionQueued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"executionDelayBlocks\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vetoERC20Voting\",\"type\":\"address\"}],\"name\":\"VetoGuardSetup\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"checkAfterExecution\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"checkTransaction\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executionDelayBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"}],\"name\":\"getTransactionHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_transactionHash\",\"type\":\"bytes32\"}],\"name\":\"getTransactionQueuedBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisSafe\",\"outputs\":[{\"internalType\":\"contract IGnosisSafe\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"queueTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vetoERC20Voting\",\"outputs\":[{\"internalType\":\"contract IVetoERC20Voting\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"checkAfterExecution(bytes32,bool)\":{\"params\":{\"success\":\"Boolean indicating whether the Gnosis Safe successfully executed the tx\",\"txHash\":\"The hash of the transaction that was executed\"}},\"checkTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,address)\":{\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"}},\"getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"details\":\"Returns the hash of all the transaction dataIt is important to note that this implementation is different than that in the Gnosis Safe contractThis implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interfaceThis implementation also omits the EIP-712 related values, since these hashes are not being signed by users\",\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"},\"returns\":{\"_0\":\"Transaction hash bytes.\"}},\"getTransactionQueuedBlock(bytes32)\":{\"params\":{\"_transactionHash\":\"The hash of the transaction data\"},\"returns\":{\"_0\":\"uint256 The block number\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"queueTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)\":{\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"signatures\":\"Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"supportsInterface(bytes4)\":{\"params\":{\"interfaceId\":\"The bytes representing the interfaceId being checked\"},\"returns\":{\"_0\":\"bool True if this contract supports the checked interface\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"checkAfterExecution(bytes32,bool)\":{\"notice\":\"Does checks after transaction is executed on the Gnosis Safe\"},\"checkTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,address)\":{\"notice\":\"This function is called by the Gnosis Safe to check if the transaction should be able to be executedReverts if this transaction cannot be executed\"},\"getTransactionQueuedBlock(bytes32)\":{\"notice\":\"Gets the block number that the transaction was queued at\"},\"queueTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)\":{\"notice\":\"Allows a user to queue the transaction, requires valid signatures\"},\"setUp(bytes)\":{\"notice\":\"Initialize function, will be triggered when a new proxy is deployed\"},\"supportsInterface(bytes4)\":{\"notice\":\"Can be used to check if this contract supports the specified interface\"}},\"notice\":\"A guard contract that prevents transactions that have been vetoed from being executed on the Gnosis Safe\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/VetoGuard.sol\":\"VetoGuard\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"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/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/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/FractalBaseGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\r\\n\\r\\nabstract contract FractalBaseGuard is ERC165 {\\r\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\r\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\r\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\r\\n function checkTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures,\\r\\n address msgSender\\r\\n ) external virtual;\\r\\n\\r\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\r\\n\\r\\n /// @notice Can be used to check if this contract supports the specified interface\\r\\n /// @param interfaceId The bytes representing the interfaceId being checked\\r\\n /// @return bool True if this contract supports the checked interface\\r\\n function supportsInterface(bytes4 interfaceId)\\r\\n public\\r\\n view\\r\\n virtual\\r\\n override\\r\\n returns (bool)\\r\\n {\\r\\n return\\r\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\r\\n super.supportsInterface(interfaceId); // 0x01ffc9a7\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x93dcc2701976a81619222994ef623ffe0c39514c75d8fac1ab3e6ac2a2e9df5d\",\"license\":\"Unlicense\"},\"contracts/TransactionHasher.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\nabstract contract TransactionHasher {\\r\\n /// @dev Returns the hash of all the transaction data\\r\\n /// @dev It is important to note that this implementation is different than that in the Gnosis Safe contract\\r\\n /// @dev This implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interface\\r\\n /// @dev This implementation also omits the EIP-712 related values, since these hashes are not being signed by users\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return Transaction hash bytes.\\r\\n function getTransactionHash(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address refundReceiver\\r\\n ) public pure returns (bytes32) {\\r\\n return keccak256(\\r\\n abi.encode(\\r\\n to,\\r\\n value,\\r\\n keccak256(data),\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n )\\r\\n );\\r\\n }\\r\\n}\",\"keccak256\":\"0x1d6ca309cc27debd165993a3929e3bdd0de8eb3c3eff79e86479ce4e2955e16d\",\"license\":\"Unlicense\"},\"contracts/VetoGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/IVetoGuard.sol\\\";\\r\\nimport \\\"./interfaces/IVetoERC20Voting.sol\\\";\\r\\nimport \\\"./interfaces/IGnosisSafe.sol\\\";\\r\\nimport \\\"./TransactionHasher.sol\\\";\\r\\nimport \\\"./FractalBaseGuard.sol\\\";\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\n/// @notice A guard contract that prevents transactions that have been vetoed from being executed on the Gnosis Safe\\r\\ncontract VetoGuard is\\r\\n TransactionHasher,\\r\\n FactoryFriendly,\\r\\n FractalBaseGuard,\\r\\n IVetoGuard\\r\\n{\\r\\n uint256 public executionDelayBlocks;\\r\\n IVetoERC20Voting public vetoERC20Voting;\\r\\n IGnosisSafe public gnosisSafe;\\r\\n mapping(bytes32 => uint256) transactionQueuedBlock;\\r\\n\\r\\n /// @notice Initialize function, will be triggered when a new proxy is deployed\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n __Ownable_init();\\r\\n (\\r\\n uint256 _executionDelayBlocks,\\r\\n address _owner,\\r\\n address _vetoERC20Voting,\\r\\n address _gnosisSafe // Address(0) == msg.sender\\r\\n ) = abi.decode(initializeParams, (uint256, address, address, address));\\r\\n\\r\\n executionDelayBlocks = _executionDelayBlocks;\\r\\n transferOwnership(_owner);\\r\\n vetoERC20Voting = IVetoERC20Voting(_vetoERC20Voting);\\r\\n gnosisSafe = IGnosisSafe(\\r\\n _gnosisSafe == address(0) ? msg.sender : _gnosisSafe\\r\\n );\\r\\n\\r\\n emit VetoGuardSetup(\\r\\n msg.sender,\\r\\n _executionDelayBlocks,\\r\\n _owner,\\r\\n _vetoERC20Voting\\r\\n );\\r\\n }\\r\\n\\r\\n /// @notice Allows a user to queue the transaction, requires valid signatures\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\r\\n function queueTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external {\\r\\n bytes32 transactionHash = getTransactionHash(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n );\\r\\n\\r\\n require(\\r\\n transactionQueuedBlock[transactionHash] == 0,\\r\\n \\\"Transaction has already been queued\\\"\\r\\n );\\r\\n\\r\\n bytes memory gnosisTransactionHash = gnosisSafe.encodeTransactionData(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver,\\r\\n gnosisSafe.nonce()\\r\\n );\\r\\n\\r\\n // If signatures are not valid, this will revert\\r\\n gnosisSafe.checkSignatures(\\r\\n keccak256(gnosisTransactionHash),\\r\\n gnosisTransactionHash,\\r\\n signatures\\r\\n );\\r\\n\\r\\n transactionQueuedBlock[transactionHash] = block.number;\\r\\n\\r\\n emit TransactionQueued(msg.sender, transactionHash, signatures);\\r\\n }\\r\\n\\r\\n /// @notice This function is called by the Gnosis Safe to check if the transaction should be able to be executed\\r\\n /// @notice Reverts if this transaction cannot be executed\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n function checkTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory,\\r\\n address\\r\\n ) external view override {\\r\\n bytes32 transactionHash = getTransactionHash(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n );\\r\\n\\r\\n require(\\r\\n transactionQueuedBlock[transactionHash] != 0,\\r\\n \\\"Transaction has not been queued yet\\\"\\r\\n );\\r\\n\\r\\n require(\\r\\n block.number >=\\r\\n transactionQueuedBlock[transactionHash] + executionDelayBlocks,\\r\\n \\\"Transaction delay period has not completed yet\\\"\\r\\n );\\r\\n\\r\\n require(\\r\\n !vetoERC20Voting.getIsVetoed(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n ),\\r\\n \\\"Transaction has been vetoed\\\"\\r\\n );\\r\\n\\r\\n require(!vetoERC20Voting.isFrozen(), \\\"DAO is frozen\\\");\\r\\n }\\r\\n\\r\\n /// @notice Does checks after transaction is executed on the Gnosis Safe\\r\\n /// @param txHash The hash of the transaction that was executed\\r\\n /// @param success Boolean indicating whether the Gnosis Safe successfully executed the tx\\r\\n function checkAfterExecution(bytes32 txHash, bool success)\\r\\n external\\r\\n view\\r\\n override\\r\\n {}\\r\\n\\r\\n /// @notice Gets the block number that the transaction was queued at\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return uint256 The block number\\r\\n function getTransactionQueuedBlock(bytes32 _transactionHash)\\r\\n public\\r\\n view\\r\\n returns (uint256)\\r\\n {\\r\\n return transactionQueuedBlock[_transactionHash];\\r\\n }\\r\\n\\r\\n\\r\\n /// @notice Can be used to check if this contract supports the specified interface\\r\\n /// @param interfaceId The bytes representing the interfaceId being checked\\r\\n /// @return bool True if this contract supports the checked interface\\r\\n function supportsInterface(bytes4 interfaceId)\\r\\n public\\r\\n view\\r\\n virtual\\r\\n override (FractalBaseGuard)\\r\\n returns (bool)\\r\\n {\\r\\n return\\r\\n interfaceId == type(IVetoGuard).interfaceId ||\\r\\n super.supportsInterface(interfaceId);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x416854c7a5856c0562c91b3f2fa49b6c44ba62a0ab4b41b054da53c320ef74ab\",\"license\":\"Unlicense\"},\"contracts/interfaces/IGnosisSafe.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IGnosisSafe {\\r\\n function nonce() external view returns (uint256);\\r\\n\\r\\n /// @dev Setup function sets initial storage of contract.\\r\\n /// @param _owners List of Safe owners.\\r\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\r\\n /// @param to Contract address for optional delegate call.\\r\\n /// @param data Data payload for optional delegate call.\\r\\n /// @param fallbackHandler Handler for fallback calls to this contract\\r\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\r\\n /// @param payment Value that should be paid\\r\\n /// @param paymentReceiver Address that should receive the payment (or 0 if tx.origin)\\r\\n function setup(\\r\\n address[] calldata _owners,\\r\\n uint256 _threshold,\\r\\n address to,\\r\\n bytes calldata data,\\r\\n address fallbackHandler,\\r\\n address paymentToken,\\r\\n uint256 payment,\\r\\n address payable paymentReceiver\\r\\n ) external;\\r\\n\\r\\n function setGuard(address guard) external;\\r\\n\\r\\n function execTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes calldata data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external payable returns (bool success);\\r\\n\\r\\n /**\\r\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\r\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\r\\n * @param data That should be signed (this is passed to an external validator contract)\\r\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\r\\n */\\r\\n function checkSignatures(\\r\\n bytes32 dataHash,\\r\\n bytes memory data,\\r\\n bytes memory signatures\\r\\n ) external view;\\r\\n\\r\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param _nonce Transaction nonce.\\r\\n /// @return Transaction hash bytes.\\r\\n function encodeTransactionData(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes calldata data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address refundReceiver,\\r\\n uint256 _nonce\\r\\n ) external view returns (bytes memory);\\r\\n}\\r\\n\",\"keccak256\":\"0xd7e3e6cd8622e520a74cac2168e6a7c98bbbdb54b8dc104de2ef05a7c71c049e\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoERC20Voting.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoERC20Voting {\\r\\n event VetoVoteCast(\\r\\n address indexed voter,\\r\\n bytes32 indexed transactionHash,\\r\\n uint256 votesCast,\\r\\n bool freeze\\r\\n );\\r\\n\\r\\n event FreezeVoteCast(address indexed voter, uint256 votesCast);\\r\\n\\r\\n event FreezeProposalCreated(address indexed creator);\\r\\n\\r\\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\\r\\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external;\\r\\n\\r\\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\\r\\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\\r\\n function castFreezeVote() external;\\r\\n\\r\\n /// @notice Returns whether the specified functions has been vetoed\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return bool True if the transaction is vetoed\\r\\n function getIsVetoed(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver\\r\\n ) external view returns (bool);\\r\\n\\r\\n /// @notice Returns true if the DAO is currently frozen\\r\\n /// @return bool Indicates whether the DAO is currently frozen\\r\\n function isFrozen() external view returns (bool);\\r\\n}\\r\\n\",\"keccak256\":\"0x311504cd22c6966073173ff50df3e1a94bca90f3c4eb811b07aef9d2fa70d0da\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoGuard {\\r\\n event VetoGuardSetup(\\r\\n address creator,\\r\\n uint256 executionDelayBlocks,\\r\\n address indexed owner,\\r\\n address indexed vetoERC20Voting\\r\\n );\\r\\n\\r\\n event TransactionQueued(\\r\\n address indexed queuer,\\r\\n bytes32 indexed transactionHash,\\r\\n bytes indexed signatures\\r\\n );\\r\\n\\r\\n /// @notice Allows a user to queue the transaction, requires valid signatures\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\r\\n function queueTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external;\\r\\n\\r\\n /// @notice Gets the block number that the transaction was queued at\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return uint256 The block number\\r\\n function getTransactionQueuedBlock(bytes32 _transactionHash)\\r\\n external\\r\\n view\\r\\n returns (uint256);\\r\\n}\\r\\n\",\"keccak256\":\"0xd20724f921b4adc649088e7877f58cbb551761198e655ca8e37b7ff6996ec4e3\",\"license\":\"Unlicense\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506112df806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063932713681161008c578063b59ee1db11610066578063b59ee1db146101ae578063c92422a3146101ce578063f2fde38b146101d7578063fde95969146101ea57600080fd5b80639327136814610176578063a4f9edbf14610188578063a84173ae1461019b57600080fd5b806301ffc9a7146100d45780631ce2357e146100fc57806365d5d08c14610127578063715018a61461014857806375f0bb52146101525780638da5cb5b14610165575b600080fd5b6100e76100e2366004610ae4565b6101fd565b60405190151581526020015b60405180910390f35b60665461010f906001600160a01b031681565b6040516001600160a01b0390911681526020016100f3565b61013a610135366004610c0e565b610228565b6040519081526020016100f3565b610150610277565b005b610150610160366004610cbd565b61028b565b6033546001600160a01b031661010f565b610150610184366004610db0565b5050565b610150610196366004610de0565b610520565b60675461010f906001600160a01b031681565b61013a6101bc366004610e1d565b60009081526068602052604090205490565b61013a60655481565b6101506101e5366004610e36565b6106f2565b6101506101f8366004610e53565b61076b565b60006001600160e01b0319821663243bdc5960e11b14806102225750610222826109a9565b92915050565b60008989898051906020012089898989898960405160200161025299989796959493929190610f44565b6040516020818303038152906040528051906020012090509998505050505050505050565b61027f6109de565b6102896000610a38565b565b600061029e8c8c8c8c8c8c8c8c8c610228565b6000818152606860205260408120549192500361030e5760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f74206265656e20717565756564206044820152621e595d60ea1b60648201526084015b60405180910390fd5b60655460008281526068602052604090205461032a9190610fa4565b4310156103905760405162461bcd60e51b815260206004820152602e60248201527f5472616e73616374696f6e2064656c617920706572696f6420686173206e6f7460448201526d0818dbdb5c1b195d1959081e595d60921b6064820152608401610305565b6066546040516391775ec560e01b81526001600160a01b03909116906391775ec5906103d0908f908f908f908f908f908f908f908f908f90600401611026565b602060405180830381865afa1580156103ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104119190611095565b1561045e5760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e20686173206265656e207665746f656400000000006044820152606401610305565b606660009054906101000a90046001600160a01b03166001600160a01b03166333eeb1476040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d59190611095565b156105125760405162461bcd60e51b815260206004820152600d60248201526c2220a79034b990333937bd32b760991b6044820152606401610305565b505050505050505050505050565b600054610100900460ff16158080156105405750600054600160ff909116105b8061055a5750303b15801561055a575060005460ff166001145b6105bd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610305565b6000805460ff1916600117905580156105e0576000805461ff0019166101001790555b6105e8610a8a565b6000806000808580602001905181019061060291906110b2565b93509350935093508360658190555061061a836106f2565b606680546001600160a01b0319166001600160a01b03848116919091179091558116156106475780610649565b335b606780546001600160a01b0319166001600160a01b039283161790556040805133815260208101879052848316928616917f0b3fefe2aeaa1db4438b4c73958a74bcf79a95fb7ebb4a12246e98fc99191358910160405180910390a3505050508015610184576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6106fa6109de565b6001600160a01b03811661075f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610305565b61076881610a38565b50565b600061077e8b8b8b8b8b8b8b8b8b610228565b600081815260686020526040902054909150156107e95760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e2068617320616c7265616479206265656e207175656044820152621d595960ea1b6064820152608401610305565b6067546040805163057ff68760e51b815290516000926001600160a01b03169163e86637db918f918f918f918f918f918f918f918f918f918c9163affed0e0916004808201926020929091908290030181865afa15801561084e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108729190611107565b6040518b63ffffffff1660e01b81526004016108979a99989796959493929190611120565b600060405180830381865afa1580156108b4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108dc9190810190611196565b6067548151602083012060405163934f3a1160e01b81529293506001600160a01b039091169163934f3a1191610918918590889060040161120d565b60006040518083038186803b15801561093057600080fd5b505afa158015610944573d6000803e3d6000fd5b505050600083815260686020526040908190204390555161096791508490611242565b60405190819003812090839033907feee518afd7ded3634c76d99045925e4498b45ff00555847a227358b9420b317490600090a4505050505050505050505050565b60006001600160e01b0319821663736bd41d60e11b148061022257506301ffc9a760e01b6001600160e01b0319831614610222565b6033546001600160a01b031633146102895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610305565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610ab15760405162461bcd60e51b81526004016103059061125e565b610289600054610100900460ff16610adb5760405162461bcd60e51b81526004016103059061125e565b61028933610a38565b600060208284031215610af657600080fd5b81356001600160e01b031981168114610b0e57600080fd5b9392505050565b6001600160a01b038116811461076857600080fd5b8035610b3581610b15565b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610b7957610b79610b3a565b604052919050565b600067ffffffffffffffff821115610b9b57610b9b610b3a565b50601f01601f191660200190565b600082601f830112610bba57600080fd5b8135610bcd610bc882610b81565b610b50565b818152846020838601011115610be257600080fd5b816020850160208301376000918101602001919091529392505050565b803560028110610b3557600080fd5b60008060008060008060008060006101208a8c031215610c2d57600080fd5b8935610c3881610b15565b985060208a0135975060408a013567ffffffffffffffff811115610c5b57600080fd5b610c678c828d01610ba9565b975050610c7660608b01610bff565b955060808a0135945060a08a0135935060c08a0135925060e08a0135610c9b81610b15565b91506101008a0135610cac81610b15565b809150509295985092959850929598565b60008060008060008060008060008060006101608c8e031215610cdf57600080fd5b610ce88c610b2a565b9a5060208c0135995067ffffffffffffffff8060408e01351115610d0b57600080fd5b610d1b8e60408f01358f01610ba9565b9950610d2960608e01610bff565b985060808d0135975060a08d0135965060c08d01359550610d4c60e08e01610b2a565b9450610d5b6101008e01610b2a565b9350806101208e01351115610d6f57600080fd5b50610d818d6101208e01358e01610ba9565b9150610d906101408d01610b2a565b90509295989b509295989b9093969950565b801515811461076857600080fd5b60008060408385031215610dc357600080fd5b823591506020830135610dd581610da2565b809150509250929050565b600060208284031215610df257600080fd5b813567ffffffffffffffff811115610e0957600080fd5b610e1584828501610ba9565b949350505050565b600060208284031215610e2f57600080fd5b5035919050565b600060208284031215610e4857600080fd5b8135610b0e81610b15565b6000806000806000806000806000806101408b8d031215610e7357600080fd5b610e7c8b610b2a565b995060208b0135985060408b013567ffffffffffffffff80821115610ea057600080fd5b610eac8e838f01610ba9565b9950610eba60608e01610bff565b985060808d0135975060a08d0135965060c08d01359550610edd60e08e01610b2a565b9450610eec6101008e01610b2a565b93506101208d0135915080821115610f0357600080fd5b50610f108d828e01610ba9565b9150509295989b9194979a5092959850565b60028110610f4057634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038a81168252602082018a905260408201899052610120820190610f72606084018a610f22565b8760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b60008219821115610fc557634e487b7160e01b600052601160045260246000fd5b500190565b60005b83811015610fe5578181015183820152602001610fcd565b83811115610ff4576000848401525b50505050565b60008151808452611012816020860160208601610fca565b601f01601f19169290920160200192915050565b6001600160a01b038a81168252602082018a9052610120604083018190526000916110538483018c610ffa565b9250611062606085018b610f22565b8860808501528760a08501528660c085015280861660e085015280851661010085015250509a9950505050505050505050565b6000602082840312156110a757600080fd5b8151610b0e81610da2565b600080600080608085870312156110c857600080fd5b8451935060208501516110da81610b15565b60408601519093506110eb81610b15565b60608601519092506110fc81610b15565b939692955090935050565b60006020828403121561111957600080fd5b5051919050565b6001600160a01b038b81168252602082018b90526101406040830181905260009161114d8483018d610ffa565b925061115c606085018c610f22565b60808401999099525060a082019690965260c081019490945291851660e08401529093166101008201526101200191909152949350505050565b6000602082840312156111a857600080fd5b815167ffffffffffffffff8111156111bf57600080fd5b8201601f810184136111d057600080fd5b80516111de610bc882610b81565b8181528560208385010111156111f357600080fd5b611204826020830160208601610fca565b95945050505050565b8381526060602082015260006112266060830185610ffa565b82810360408401526112388185610ffa565b9695505050505050565b60008251611254818460208701610fca565b9190910192915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212202537d5113a8b65bddf3836eb155c0aeeb4989d4fc14c1eede77aebdd4943170664736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063932713681161008c578063b59ee1db11610066578063b59ee1db146101ae578063c92422a3146101ce578063f2fde38b146101d7578063fde95969146101ea57600080fd5b80639327136814610176578063a4f9edbf14610188578063a84173ae1461019b57600080fd5b806301ffc9a7146100d45780631ce2357e146100fc57806365d5d08c14610127578063715018a61461014857806375f0bb52146101525780638da5cb5b14610165575b600080fd5b6100e76100e2366004610ae4565b6101fd565b60405190151581526020015b60405180910390f35b60665461010f906001600160a01b031681565b6040516001600160a01b0390911681526020016100f3565b61013a610135366004610c0e565b610228565b6040519081526020016100f3565b610150610277565b005b610150610160366004610cbd565b61028b565b6033546001600160a01b031661010f565b610150610184366004610db0565b5050565b610150610196366004610de0565b610520565b60675461010f906001600160a01b031681565b61013a6101bc366004610e1d565b60009081526068602052604090205490565b61013a60655481565b6101506101e5366004610e36565b6106f2565b6101506101f8366004610e53565b61076b565b60006001600160e01b0319821663243bdc5960e11b14806102225750610222826109a9565b92915050565b60008989898051906020012089898989898960405160200161025299989796959493929190610f44565b6040516020818303038152906040528051906020012090509998505050505050505050565b61027f6109de565b6102896000610a38565b565b600061029e8c8c8c8c8c8c8c8c8c610228565b6000818152606860205260408120549192500361030e5760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f74206265656e20717565756564206044820152621e595d60ea1b60648201526084015b60405180910390fd5b60655460008281526068602052604090205461032a9190610fa4565b4310156103905760405162461bcd60e51b815260206004820152602e60248201527f5472616e73616374696f6e2064656c617920706572696f6420686173206e6f7460448201526d0818dbdb5c1b195d1959081e595d60921b6064820152608401610305565b6066546040516391775ec560e01b81526001600160a01b03909116906391775ec5906103d0908f908f908f908f908f908f908f908f908f90600401611026565b602060405180830381865afa1580156103ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104119190611095565b1561045e5760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e20686173206265656e207665746f656400000000006044820152606401610305565b606660009054906101000a90046001600160a01b03166001600160a01b03166333eeb1476040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d59190611095565b156105125760405162461bcd60e51b815260206004820152600d60248201526c2220a79034b990333937bd32b760991b6044820152606401610305565b505050505050505050505050565b600054610100900460ff16158080156105405750600054600160ff909116105b8061055a5750303b15801561055a575060005460ff166001145b6105bd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610305565b6000805460ff1916600117905580156105e0576000805461ff0019166101001790555b6105e8610a8a565b6000806000808580602001905181019061060291906110b2565b93509350935093508360658190555061061a836106f2565b606680546001600160a01b0319166001600160a01b03848116919091179091558116156106475780610649565b335b606780546001600160a01b0319166001600160a01b039283161790556040805133815260208101879052848316928616917f0b3fefe2aeaa1db4438b4c73958a74bcf79a95fb7ebb4a12246e98fc99191358910160405180910390a3505050508015610184576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6106fa6109de565b6001600160a01b03811661075f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610305565b61076881610a38565b50565b600061077e8b8b8b8b8b8b8b8b8b610228565b600081815260686020526040902054909150156107e95760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e2068617320616c7265616479206265656e207175656044820152621d595960ea1b6064820152608401610305565b6067546040805163057ff68760e51b815290516000926001600160a01b03169163e86637db918f918f918f918f918f918f918f918f918f918c9163affed0e0916004808201926020929091908290030181865afa15801561084e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108729190611107565b6040518b63ffffffff1660e01b81526004016108979a99989796959493929190611120565b600060405180830381865afa1580156108b4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108dc9190810190611196565b6067548151602083012060405163934f3a1160e01b81529293506001600160a01b039091169163934f3a1191610918918590889060040161120d565b60006040518083038186803b15801561093057600080fd5b505afa158015610944573d6000803e3d6000fd5b505050600083815260686020526040908190204390555161096791508490611242565b60405190819003812090839033907feee518afd7ded3634c76d99045925e4498b45ff00555847a227358b9420b317490600090a4505050505050505050505050565b60006001600160e01b0319821663736bd41d60e11b148061022257506301ffc9a760e01b6001600160e01b0319831614610222565b6033546001600160a01b031633146102895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610305565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610ab15760405162461bcd60e51b81526004016103059061125e565b610289600054610100900460ff16610adb5760405162461bcd60e51b81526004016103059061125e565b61028933610a38565b600060208284031215610af657600080fd5b81356001600160e01b031981168114610b0e57600080fd5b9392505050565b6001600160a01b038116811461076857600080fd5b8035610b3581610b15565b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610b7957610b79610b3a565b604052919050565b600067ffffffffffffffff821115610b9b57610b9b610b3a565b50601f01601f191660200190565b600082601f830112610bba57600080fd5b8135610bcd610bc882610b81565b610b50565b818152846020838601011115610be257600080fd5b816020850160208301376000918101602001919091529392505050565b803560028110610b3557600080fd5b60008060008060008060008060006101208a8c031215610c2d57600080fd5b8935610c3881610b15565b985060208a0135975060408a013567ffffffffffffffff811115610c5b57600080fd5b610c678c828d01610ba9565b975050610c7660608b01610bff565b955060808a0135945060a08a0135935060c08a0135925060e08a0135610c9b81610b15565b91506101008a0135610cac81610b15565b809150509295985092959850929598565b60008060008060008060008060008060006101608c8e031215610cdf57600080fd5b610ce88c610b2a565b9a5060208c0135995067ffffffffffffffff8060408e01351115610d0b57600080fd5b610d1b8e60408f01358f01610ba9565b9950610d2960608e01610bff565b985060808d0135975060a08d0135965060c08d01359550610d4c60e08e01610b2a565b9450610d5b6101008e01610b2a565b9350806101208e01351115610d6f57600080fd5b50610d818d6101208e01358e01610ba9565b9150610d906101408d01610b2a565b90509295989b509295989b9093969950565b801515811461076857600080fd5b60008060408385031215610dc357600080fd5b823591506020830135610dd581610da2565b809150509250929050565b600060208284031215610df257600080fd5b813567ffffffffffffffff811115610e0957600080fd5b610e1584828501610ba9565b949350505050565b600060208284031215610e2f57600080fd5b5035919050565b600060208284031215610e4857600080fd5b8135610b0e81610b15565b6000806000806000806000806000806101408b8d031215610e7357600080fd5b610e7c8b610b2a565b995060208b0135985060408b013567ffffffffffffffff80821115610ea057600080fd5b610eac8e838f01610ba9565b9950610eba60608e01610bff565b985060808d0135975060a08d0135965060c08d01359550610edd60e08e01610b2a565b9450610eec6101008e01610b2a565b93506101208d0135915080821115610f0357600080fd5b50610f108d828e01610ba9565b9150509295989b9194979a5092959850565b60028110610f4057634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038a81168252602082018a905260408201899052610120820190610f72606084018a610f22565b8760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b60008219821115610fc557634e487b7160e01b600052601160045260246000fd5b500190565b60005b83811015610fe5578181015183820152602001610fcd565b83811115610ff4576000848401525b50505050565b60008151808452611012816020860160208601610fca565b601f01601f19169290920160200192915050565b6001600160a01b038a81168252602082018a9052610120604083018190526000916110538483018c610ffa565b9250611062606085018b610f22565b8860808501528760a08501528660c085015280861660e085015280851661010085015250509a9950505050505050505050565b6000602082840312156110a757600080fd5b8151610b0e81610da2565b600080600080608085870312156110c857600080fd5b8451935060208501516110da81610b15565b60408601519093506110eb81610b15565b60608601519092506110fc81610b15565b939692955090935050565b60006020828403121561111957600080fd5b5051919050565b6001600160a01b038b81168252602082018b90526101406040830181905260009161114d8483018d610ffa565b925061115c606085018c610f22565b60808401999099525060a082019690965260c081019490945291851660e08401529093166101008201526101200191909152949350505050565b6000602082840312156111a857600080fd5b815167ffffffffffffffff8111156111bf57600080fd5b8201601f810184136111d057600080fd5b80516111de610bc882610b81565b8181528560208385010111156111f357600080fd5b611204826020830160208601610fca565b95945050505050565b8381526060602082015260006112266060830185610ffa565b82810360408401526112388185610ffa565b9695505050505050565b60008251611254818460208701610fca565b9190910192915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212202537d5113a8b65bddf3836eb155c0aeeb4989d4fc14c1eede77aebdd4943170664736f6c634300080d0033", + "solcInputHash": "b2fc18a2e663b1410a34647a57a06e84", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"queuer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transactionHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"TransactionQueued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"executionDelayBlocks\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vetoERC20Voting\",\"type\":\"address\"}],\"name\":\"VetoGuardSetup\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"checkAfterExecution\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"checkTransaction\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executionDelayBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"}],\"name\":\"getTransactionHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_transactionHash\",\"type\":\"bytes32\"}],\"name\":\"getTransactionQueuedBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisSafe\",\"outputs\":[{\"internalType\":\"contract IGnosisSafe\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"queueTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_executionDelayBlocks\",\"type\":\"uint256\"}],\"name\":\"updateExecutionDelayBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vetoVoting\",\"outputs\":[{\"internalType\":\"contract IVetoVoting\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"checkAfterExecution(bytes32,bool)\":{\"params\":{\"success\":\"Boolean indicating whether the Gnosis Safe successfully executed the tx\",\"txHash\":\"The hash of the transaction that was executed\"}},\"checkTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,address)\":{\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"}},\"getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"details\":\"Returns the hash of all the transaction dataIt is important to note that this implementation is different than that in the Gnosis Safe contractThis implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interfaceThis implementation also omits the EIP-712 related values, since these hashes are not being signed by users\",\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"},\"returns\":{\"_0\":\"Transaction hash bytes.\"}},\"getTransactionQueuedBlock(bytes32)\":{\"params\":{\"_transactionHash\":\"The hash of the transaction data\"},\"returns\":{\"_0\":\"uint256 The block number\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"queueTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)\":{\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"signatures\":\"Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"supportsInterface(bytes4)\":{\"params\":{\"interfaceId\":\"The bytes representing the interfaceId being checked\"},\"returns\":{\"_0\":\"bool True if this contract supports the checked interface\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateExecutionDelayBlocks(uint256)\":{\"params\":{\"_executionDelayBlocks\":\"The number of blocks between when a transaction is queued and can be executed\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"checkAfterExecution(bytes32,bool)\":{\"notice\":\"Does checks after transaction is executed on the Gnosis Safe\"},\"checkTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,address)\":{\"notice\":\"This function is called by the Gnosis Safe to check if the transaction should be able to be executedReverts if this transaction cannot be executed\"},\"getTransactionQueuedBlock(bytes32)\":{\"notice\":\"Gets the block number that the transaction was queued at\"},\"queueTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)\":{\"notice\":\"Allows a user to queue the transaction, requires valid signatures\"},\"setUp(bytes)\":{\"notice\":\"Initialize function, will be triggered when a new proxy is deployed\"},\"supportsInterface(bytes4)\":{\"notice\":\"Can be used to check if this contract supports the specified interface\"},\"updateExecutionDelayBlocks(uint256)\":{\"notice\":\"Updates the execution delay blocks, only callable by the owner\"}},\"notice\":\"A guard contract that prevents transactions that have been vetoed from being executed on the Gnosis Safe\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/VetoGuard.sol\":\"VetoGuard\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"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/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/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/FractalBaseGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\r\\n\\r\\nabstract contract FractalBaseGuard is ERC165 {\\r\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\r\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\r\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\r\\n function checkTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures,\\r\\n address msgSender\\r\\n ) external virtual;\\r\\n\\r\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\r\\n\\r\\n /// @notice Can be used to check if this contract supports the specified interface\\r\\n /// @param interfaceId The bytes representing the interfaceId being checked\\r\\n /// @return bool True if this contract supports the checked interface\\r\\n function supportsInterface(bytes4 interfaceId)\\r\\n public\\r\\n view\\r\\n virtual\\r\\n override\\r\\n returns (bool)\\r\\n {\\r\\n return\\r\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\r\\n super.supportsInterface(interfaceId); // 0x01ffc9a7\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x93dcc2701976a81619222994ef623ffe0c39514c75d8fac1ab3e6ac2a2e9df5d\",\"license\":\"Unlicense\"},\"contracts/TransactionHasher.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\nabstract contract TransactionHasher {\\r\\n /// @dev Returns the hash of all the transaction data\\r\\n /// @dev It is important to note that this implementation is different than that in the Gnosis Safe contract\\r\\n /// @dev This implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interface\\r\\n /// @dev This implementation also omits the EIP-712 related values, since these hashes are not being signed by users\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return Transaction hash bytes.\\r\\n function getTransactionHash(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address refundReceiver\\r\\n ) public pure returns (bytes32) {\\r\\n return keccak256(\\r\\n abi.encode(\\r\\n to,\\r\\n value,\\r\\n keccak256(data),\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n )\\r\\n );\\r\\n }\\r\\n}\",\"keccak256\":\"0x1d6ca309cc27debd165993a3929e3bdd0de8eb3c3eff79e86479ce4e2955e16d\",\"license\":\"Unlicense\"},\"contracts/VetoGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/IVetoGuard.sol\\\";\\r\\nimport \\\"./interfaces/IVetoVoting.sol\\\";\\r\\nimport \\\"./interfaces/IGnosisSafe.sol\\\";\\r\\nimport \\\"./TransactionHasher.sol\\\";\\r\\nimport \\\"./FractalBaseGuard.sol\\\";\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\n/// @notice A guard contract that prevents transactions that have been vetoed from being executed on the Gnosis Safe\\r\\ncontract VetoGuard is\\r\\n TransactionHasher,\\r\\n FactoryFriendly,\\r\\n FractalBaseGuard,\\r\\n IVetoGuard\\r\\n{\\r\\n uint256 public executionDelayBlocks;\\r\\n IVetoVoting public vetoVoting;\\r\\n IGnosisSafe public gnosisSafe;\\r\\n mapping(bytes32 => uint256) transactionQueuedBlock;\\r\\n\\r\\n /// @notice Initialize function, will be triggered when a new proxy is deployed\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n __Ownable_init();\\r\\n (\\r\\n uint256 _executionDelayBlocks,\\r\\n address _owner,\\r\\n address _vetoVoting,\\r\\n address _gnosisSafe // Address(0) == msg.sender\\r\\n ) = abi.decode(initializeParams, (uint256, address, address, address));\\r\\n\\r\\n executionDelayBlocks = _executionDelayBlocks;\\r\\n transferOwnership(_owner);\\r\\n vetoVoting = IVetoVoting(_vetoVoting);\\r\\n gnosisSafe = IGnosisSafe(\\r\\n _gnosisSafe == address(0) ? msg.sender : _gnosisSafe\\r\\n );\\r\\n\\r\\n emit VetoGuardSetup(\\r\\n msg.sender,\\r\\n _executionDelayBlocks,\\r\\n _owner,\\r\\n _vetoVoting\\r\\n );\\r\\n }\\r\\n\\r\\n /// @notice Allows a user to queue the transaction, requires valid signatures\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\r\\n function queueTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external {\\r\\n bytes32 transactionHash = getTransactionHash(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n );\\r\\n\\r\\n require(\\r\\n transactionQueuedBlock[transactionHash] == 0,\\r\\n \\\"Transaction has already been queued\\\"\\r\\n );\\r\\n\\r\\n bytes memory gnosisTransactionHash = gnosisSafe.encodeTransactionData(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver,\\r\\n gnosisSafe.nonce()\\r\\n );\\r\\n\\r\\n // If signatures are not valid, this will revert\\r\\n gnosisSafe.checkSignatures(\\r\\n keccak256(gnosisTransactionHash),\\r\\n gnosisTransactionHash,\\r\\n signatures\\r\\n );\\r\\n\\r\\n transactionQueuedBlock[transactionHash] = block.number;\\r\\n\\r\\n emit TransactionQueued(msg.sender, transactionHash, signatures);\\r\\n }\\r\\n\\r\\n /// @notice Updates the execution delay blocks, only callable by the owner\\r\\n /// @param _executionDelayBlocks The number of blocks between when a transaction is queued and can be executed\\r\\n function updateExecutionDelayBlocks(uint256 _executionDelayBlocks)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n executionDelayBlocks = _executionDelayBlocks;\\r\\n }\\r\\n\\r\\n /// @notice This function is called by the Gnosis Safe to check if the transaction should be able to be executed\\r\\n /// @notice Reverts if this transaction cannot be executed\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n function checkTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory,\\r\\n address\\r\\n ) external view override {\\r\\n bytes32 transactionHash = getTransactionHash(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n );\\r\\n\\r\\n require(\\r\\n transactionQueuedBlock[transactionHash] != 0,\\r\\n \\\"Transaction has not been queued yet\\\"\\r\\n );\\r\\n\\r\\n require(\\r\\n block.number >=\\r\\n transactionQueuedBlock[transactionHash] + executionDelayBlocks,\\r\\n \\\"Transaction delay period has not completed yet\\\"\\r\\n );\\r\\n\\r\\n require(\\r\\n !vetoVoting.getIsVetoed(\\r\\n getTransactionHash(\\r\\n to,\\r\\n value,\\r\\n data,\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n )\\r\\n ),\\r\\n \\\"Transaction has been vetoed\\\"\\r\\n );\\r\\n\\r\\n require(!vetoVoting.isFrozen(), \\\"DAO is frozen\\\");\\r\\n }\\r\\n\\r\\n /// @notice Does checks after transaction is executed on the Gnosis Safe\\r\\n /// @param txHash The hash of the transaction that was executed\\r\\n /// @param success Boolean indicating whether the Gnosis Safe successfully executed the tx\\r\\n function checkAfterExecution(bytes32 txHash, bool success)\\r\\n external\\r\\n view\\r\\n override\\r\\n {}\\r\\n\\r\\n /// @notice Gets the block number that the transaction was queued at\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return uint256 The block number\\r\\n function getTransactionQueuedBlock(bytes32 _transactionHash)\\r\\n public\\r\\n view\\r\\n returns (uint256)\\r\\n {\\r\\n return transactionQueuedBlock[_transactionHash];\\r\\n }\\r\\n\\r\\n /// @notice Can be used to check if this contract supports the specified interface\\r\\n /// @param interfaceId The bytes representing the interfaceId being checked\\r\\n /// @return bool True if this contract supports the checked interface\\r\\n function supportsInterface(bytes4 interfaceId)\\r\\n public\\r\\n view\\r\\n virtual\\r\\n override(FractalBaseGuard)\\r\\n returns (bool)\\r\\n {\\r\\n return\\r\\n interfaceId == type(IVetoGuard).interfaceId ||\\r\\n super.supportsInterface(interfaceId);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xd2fb3586720aa2ebc02cb6b88e3c4b79c21e8a689902833c707490c2ff2edc88\",\"license\":\"Unlicense\"},\"contracts/interfaces/IGnosisSafe.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IGnosisSafe {\\r\\n function nonce() external view returns (uint256);\\r\\n\\r\\n /// @dev Setup function sets initial storage of contract.\\r\\n /// @param _owners List of Safe owners.\\r\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\r\\n /// @param to Contract address for optional delegate call.\\r\\n /// @param data Data payload for optional delegate call.\\r\\n /// @param fallbackHandler Handler for fallback calls to this contract\\r\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\r\\n /// @param payment Value that should be paid\\r\\n /// @param paymentReceiver Address that should receive the payment (or 0 if tx.origin)\\r\\n function setup(\\r\\n address[] calldata _owners,\\r\\n uint256 _threshold,\\r\\n address to,\\r\\n bytes calldata data,\\r\\n address fallbackHandler,\\r\\n address paymentToken,\\r\\n uint256 payment,\\r\\n address payable paymentReceiver\\r\\n ) external;\\r\\n\\r\\n function setGuard(address guard) external;\\r\\n\\r\\n function execTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes calldata data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external payable returns (bool success);\\r\\n\\r\\n /**\\r\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\r\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\r\\n * @param data That should be signed (this is passed to an external validator contract)\\r\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\r\\n */\\r\\n function checkSignatures(\\r\\n bytes32 dataHash,\\r\\n bytes memory data,\\r\\n bytes memory signatures\\r\\n ) external view;\\r\\n\\r\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param _nonce Transaction nonce.\\r\\n /// @return Transaction hash bytes.\\r\\n function encodeTransactionData(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes calldata data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address refundReceiver,\\r\\n uint256 _nonce\\r\\n ) external view returns (bytes memory);\\r\\n\\r\\n /// @notice Returns whether the passed address is an owner\\r\\n /// @param owner The address the check\\r\\n /// @return bool True if the address is an owner\\r\\n function isOwner(address owner) external view returns (bool);\\r\\n}\\r\\n\",\"keccak256\":\"0x33a81b26efda8a950aad179b62224606fd89ae98f669540363aa1cc7266b37b8\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoGuard {\\r\\n event VetoGuardSetup(\\r\\n address creator,\\r\\n uint256 executionDelayBlocks,\\r\\n address indexed owner,\\r\\n address indexed vetoERC20Voting\\r\\n );\\r\\n\\r\\n event TransactionQueued(\\r\\n address indexed queuer,\\r\\n bytes32 indexed transactionHash,\\r\\n bytes indexed signatures\\r\\n );\\r\\n\\r\\n /// @notice Allows a user to queue the transaction, requires valid signatures\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\r\\n function queueTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external;\\r\\n\\r\\n /// @notice Updates the execution delay blocks\\r\\n /// @param _executionDelayBlocks The number of blocks between when a transaction is queued and can be executed\\r\\n function updateExecutionDelayBlocks(\\r\\n uint256 _executionDelayBlocks\\r\\n ) external;\\r\\n\\r\\n /// @notice Gets the block number that the transaction was queued at\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return uint256 The block number\\r\\n function getTransactionQueuedBlock(bytes32 _transactionHash)\\r\\n external\\r\\n view\\r\\n returns (uint256);\\r\\n}\\r\\n\",\"keccak256\":\"0x0b11f06f35570cc8ea2ba2c4247fb87f20b5adfa6d55a2dc25c4e3ef981130ad\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoVoting.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoVoting {\\r\\n event VetoVoteCast(\\r\\n address indexed voter,\\r\\n bytes32 indexed transactionHash,\\r\\n uint256 votesCast,\\r\\n bool freeze\\r\\n );\\r\\n\\r\\n event FreezeVoteCast(address indexed voter, uint256 votesCast);\\r\\n\\r\\n event FreezeProposalCreated(address indexed creator);\\r\\n\\r\\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\\r\\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external;\\r\\n\\r\\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\\r\\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\\r\\n function castFreezeVote() external;\\r\\n\\r\\n /// @notice Returns whether the specified transaction has been vetoed\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return bool True if the transaction is vetoed\\r\\n function getIsVetoed(bytes32 _transactionHash) external view returns (bool);\\r\\n\\r\\n /// @notice Returns true if the DAO is currently frozen, false otherwise\\r\\n /// @return bool Indicates whether the DAO is currently frozen\\r\\n function isFrozen() external view returns (bool);\\r\\n}\\r\\n\",\"keccak256\":\"0x13e262efc0a67242c311292283d8c93c3783536a8bb24ae9a240c4757874a5b9\",\"license\":\"Unlicense\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506112a7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063a84173ae1161008c578063bf2e371f11610066578063bf2e371f146101e5578063c92422a3146101f8578063f2fde38b14610201578063fde959691461021457600080fd5b8063a84173ae1461019f578063b2b74f7f146101b2578063b59ee1db146101c557600080fd5b806375f0bb52116100c857806375f0bb52146101425780638da5cb5b14610155578063932713681461017a578063a4f9edbf1461018c57600080fd5b806301ffc9a7146100ef57806365d5d08c14610117578063715018a614610138575b600080fd5b6101026100fd366004610b1b565b610227565b60405190151581526020015b60405180910390f35b61012a610125366004610c45565b610252565b60405190815260200161010e565b6101406102a1565b005b610140610150366004610cf4565b6102b5565b6033546001600160a01b03165b6040516001600160a01b03909116815260200161010e565b610140610188366004610de7565b5050565b61014061019a366004610e17565b61054a565b606754610162906001600160a01b031681565b6101406101c0366004610e54565b61071c565b61012a6101d3366004610e54565b60009081526068602052604090205490565b606654610162906001600160a01b031681565b61012a60655481565b61014061020f366004610e6d565b610729565b610140610222366004610e8a565b6107a2565b60006001600160e01b0319821663fac0f7cd60e01b148061024c575061024c826109e0565b92915050565b60008989898051906020012089898989898960405160200161027c99989796959493929190610f7b565b6040516020818303038152906040528051906020012090509998505050505050505050565b6102a9610a15565b6102b36000610a6f565b565b60006102c88c8c8c8c8c8c8c8c8c610252565b600081815260686020526040812054919250036103385760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f74206265656e20717565756564206044820152621e595d60ea1b60648201526084015b60405180910390fd5b6065546000828152606860205260409020546103549190610fdb565b4310156103ba5760405162461bcd60e51b815260206004820152602e60248201527f5472616e73616374696f6e2064656c617920706572696f6420686173206e6f7460448201526d0818dbdb5c1b195d1959081e595d60921b606482015260840161032f565b6066546001600160a01b031663e1a411526103dc8e8e8e8e8e8e8e8e8e610252565b6040518263ffffffff1660e01b81526004016103fa91815260200190565b602060405180830381865afa158015610417573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043b9190611001565b156104885760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e20686173206265656e207665746f65640000000000604482015260640161032f565b606660009054906101000a90046001600160a01b03166001600160a01b03166333eeb1476040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ff9190611001565b1561053c5760405162461bcd60e51b815260206004820152600d60248201526c2220a79034b990333937bd32b760991b604482015260640161032f565b505050505050505050505050565b600054610100900460ff161580801561056a5750600054600160ff909116105b806105845750303b158015610584575060005460ff166001145b6105e75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161032f565b6000805460ff19166001179055801561060a576000805461ff0019166101001790555b610612610ac1565b6000806000808580602001905181019061062c919061101e565b93509350935093508360658190555061064483610729565b606680546001600160a01b0319166001600160a01b03848116919091179091558116156106715780610673565b335b606780546001600160a01b0319166001600160a01b039283161790556040805133815260208101879052848316928616917f0b3fefe2aeaa1db4438b4c73958a74bcf79a95fb7ebb4a12246e98fc99191358910160405180910390a3505050508015610188576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b610724610a15565b606555565b610731610a15565b6001600160a01b0381166107965760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161032f565b61079f81610a6f565b50565b60006107b58b8b8b8b8b8b8b8b8b610252565b600081815260686020526040902054909150156108205760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e2068617320616c7265616479206265656e207175656044820152621d595960ea1b606482015260840161032f565b6067546040805163057ff68760e51b815290516000926001600160a01b03169163e86637db918f918f918f918f918f918f918f918f918f918c9163affed0e0916004808201926020929091908290030181865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a99190611073565b6040518b63ffffffff1660e01b81526004016108ce9a999897969594939291906110e8565b600060405180830381865afa1580156108eb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610913919081019061115e565b6067548151602083012060405163934f3a1160e01b81529293506001600160a01b039091169163934f3a119161094f91859088906004016111d5565b60006040518083038186803b15801561096757600080fd5b505afa15801561097b573d6000803e3d6000fd5b505050600083815260686020526040908190204390555161099e9150849061120a565b60405190819003812090839033907feee518afd7ded3634c76d99045925e4498b45ff00555847a227358b9420b317490600090a4505050505050505050505050565b60006001600160e01b0319821663736bd41d60e11b148061024c57506301ffc9a760e01b6001600160e01b031983161461024c565b6033546001600160a01b031633146102b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161032f565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610ae85760405162461bcd60e51b815260040161032f90611226565b6102b3600054610100900460ff16610b125760405162461bcd60e51b815260040161032f90611226565b6102b333610a6f565b600060208284031215610b2d57600080fd5b81356001600160e01b031981168114610b4557600080fd5b9392505050565b6001600160a01b038116811461079f57600080fd5b8035610b6c81610b4c565b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610bb057610bb0610b71565b604052919050565b600067ffffffffffffffff821115610bd257610bd2610b71565b50601f01601f191660200190565b600082601f830112610bf157600080fd5b8135610c04610bff82610bb8565b610b87565b818152846020838601011115610c1957600080fd5b816020850160208301376000918101602001919091529392505050565b803560028110610b6c57600080fd5b60008060008060008060008060006101208a8c031215610c6457600080fd5b8935610c6f81610b4c565b985060208a0135975060408a013567ffffffffffffffff811115610c9257600080fd5b610c9e8c828d01610be0565b975050610cad60608b01610c36565b955060808a0135945060a08a0135935060c08a0135925060e08a0135610cd281610b4c565b91506101008a0135610ce381610b4c565b809150509295985092959850929598565b60008060008060008060008060008060006101608c8e031215610d1657600080fd5b610d1f8c610b61565b9a5060208c0135995067ffffffffffffffff8060408e01351115610d4257600080fd5b610d528e60408f01358f01610be0565b9950610d6060608e01610c36565b985060808d0135975060a08d0135965060c08d01359550610d8360e08e01610b61565b9450610d926101008e01610b61565b9350806101208e01351115610da657600080fd5b50610db88d6101208e01358e01610be0565b9150610dc76101408d01610b61565b90509295989b509295989b9093969950565b801515811461079f57600080fd5b60008060408385031215610dfa57600080fd5b823591506020830135610e0c81610dd9565b809150509250929050565b600060208284031215610e2957600080fd5b813567ffffffffffffffff811115610e4057600080fd5b610e4c84828501610be0565b949350505050565b600060208284031215610e6657600080fd5b5035919050565b600060208284031215610e7f57600080fd5b8135610b4581610b4c565b6000806000806000806000806000806101408b8d031215610eaa57600080fd5b610eb38b610b61565b995060208b0135985060408b013567ffffffffffffffff80821115610ed757600080fd5b610ee38e838f01610be0565b9950610ef160608e01610c36565b985060808d0135975060a08d0135965060c08d01359550610f1460e08e01610b61565b9450610f236101008e01610b61565b93506101208d0135915080821115610f3a57600080fd5b50610f478d828e01610be0565b9150509295989b9194979a5092959850565b60028110610f7757634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038a81168252602082018a905260408201899052610120820190610fa9606084018a610f59565b8760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b60008219821115610ffc57634e487b7160e01b600052601160045260246000fd5b500190565b60006020828403121561101357600080fd5b8151610b4581610dd9565b6000806000806080858703121561103457600080fd5b84519350602085015161104681610b4c565b604086015190935061105781610b4c565b606086015190925061106881610b4c565b939692955090935050565b60006020828403121561108557600080fd5b5051919050565b60005b838110156110a757818101518382015260200161108f565b838111156110b6576000848401525b50505050565b600081518084526110d481602086016020860161108c565b601f01601f19169290920160200192915050565b6001600160a01b038b81168252602082018b9052610140604083018190526000916111158483018d6110bc565b9250611124606085018c610f59565b60808401999099525060a082019690965260c081019490945291851660e08401529093166101008201526101200191909152949350505050565b60006020828403121561117057600080fd5b815167ffffffffffffffff81111561118757600080fd5b8201601f8101841361119857600080fd5b80516111a6610bff82610bb8565b8181528560208385010111156111bb57600080fd5b6111cc82602083016020860161108c565b95945050505050565b8381526060602082015260006111ee60608301856110bc565b828103604084015261120081856110bc565b9695505050505050565b6000825161121c81846020870161108c565b9190910192915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212209d72549d278c3cf72a69b1470daa80c7ab0f9ea68e79eb699d2bcaa6672d447064736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063a84173ae1161008c578063bf2e371f11610066578063bf2e371f146101e5578063c92422a3146101f8578063f2fde38b14610201578063fde959691461021457600080fd5b8063a84173ae1461019f578063b2b74f7f146101b2578063b59ee1db146101c557600080fd5b806375f0bb52116100c857806375f0bb52146101425780638da5cb5b14610155578063932713681461017a578063a4f9edbf1461018c57600080fd5b806301ffc9a7146100ef57806365d5d08c14610117578063715018a614610138575b600080fd5b6101026100fd366004610b1b565b610227565b60405190151581526020015b60405180910390f35b61012a610125366004610c45565b610252565b60405190815260200161010e565b6101406102a1565b005b610140610150366004610cf4565b6102b5565b6033546001600160a01b03165b6040516001600160a01b03909116815260200161010e565b610140610188366004610de7565b5050565b61014061019a366004610e17565b61054a565b606754610162906001600160a01b031681565b6101406101c0366004610e54565b61071c565b61012a6101d3366004610e54565b60009081526068602052604090205490565b606654610162906001600160a01b031681565b61012a60655481565b61014061020f366004610e6d565b610729565b610140610222366004610e8a565b6107a2565b60006001600160e01b0319821663fac0f7cd60e01b148061024c575061024c826109e0565b92915050565b60008989898051906020012089898989898960405160200161027c99989796959493929190610f7b565b6040516020818303038152906040528051906020012090509998505050505050505050565b6102a9610a15565b6102b36000610a6f565b565b60006102c88c8c8c8c8c8c8c8c8c610252565b600081815260686020526040812054919250036103385760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f74206265656e20717565756564206044820152621e595d60ea1b60648201526084015b60405180910390fd5b6065546000828152606860205260409020546103549190610fdb565b4310156103ba5760405162461bcd60e51b815260206004820152602e60248201527f5472616e73616374696f6e2064656c617920706572696f6420686173206e6f7460448201526d0818dbdb5c1b195d1959081e595d60921b606482015260840161032f565b6066546001600160a01b031663e1a411526103dc8e8e8e8e8e8e8e8e8e610252565b6040518263ffffffff1660e01b81526004016103fa91815260200190565b602060405180830381865afa158015610417573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043b9190611001565b156104885760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e20686173206265656e207665746f65640000000000604482015260640161032f565b606660009054906101000a90046001600160a01b03166001600160a01b03166333eeb1476040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ff9190611001565b1561053c5760405162461bcd60e51b815260206004820152600d60248201526c2220a79034b990333937bd32b760991b604482015260640161032f565b505050505050505050505050565b600054610100900460ff161580801561056a5750600054600160ff909116105b806105845750303b158015610584575060005460ff166001145b6105e75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161032f565b6000805460ff19166001179055801561060a576000805461ff0019166101001790555b610612610ac1565b6000806000808580602001905181019061062c919061101e565b93509350935093508360658190555061064483610729565b606680546001600160a01b0319166001600160a01b03848116919091179091558116156106715780610673565b335b606780546001600160a01b0319166001600160a01b039283161790556040805133815260208101879052848316928616917f0b3fefe2aeaa1db4438b4c73958a74bcf79a95fb7ebb4a12246e98fc99191358910160405180910390a3505050508015610188576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b610724610a15565b606555565b610731610a15565b6001600160a01b0381166107965760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161032f565b61079f81610a6f565b50565b60006107b58b8b8b8b8b8b8b8b8b610252565b600081815260686020526040902054909150156108205760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e2068617320616c7265616479206265656e207175656044820152621d595960ea1b606482015260840161032f565b6067546040805163057ff68760e51b815290516000926001600160a01b03169163e86637db918f918f918f918f918f918f918f918f918f918c9163affed0e0916004808201926020929091908290030181865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a99190611073565b6040518b63ffffffff1660e01b81526004016108ce9a999897969594939291906110e8565b600060405180830381865afa1580156108eb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610913919081019061115e565b6067548151602083012060405163934f3a1160e01b81529293506001600160a01b039091169163934f3a119161094f91859088906004016111d5565b60006040518083038186803b15801561096757600080fd5b505afa15801561097b573d6000803e3d6000fd5b505050600083815260686020526040908190204390555161099e9150849061120a565b60405190819003812090839033907feee518afd7ded3634c76d99045925e4498b45ff00555847a227358b9420b317490600090a4505050505050505050505050565b60006001600160e01b0319821663736bd41d60e11b148061024c57506301ffc9a760e01b6001600160e01b031983161461024c565b6033546001600160a01b031633146102b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161032f565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610ae85760405162461bcd60e51b815260040161032f90611226565b6102b3600054610100900460ff16610b125760405162461bcd60e51b815260040161032f90611226565b6102b333610a6f565b600060208284031215610b2d57600080fd5b81356001600160e01b031981168114610b4557600080fd5b9392505050565b6001600160a01b038116811461079f57600080fd5b8035610b6c81610b4c565b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610bb057610bb0610b71565b604052919050565b600067ffffffffffffffff821115610bd257610bd2610b71565b50601f01601f191660200190565b600082601f830112610bf157600080fd5b8135610c04610bff82610bb8565b610b87565b818152846020838601011115610c1957600080fd5b816020850160208301376000918101602001919091529392505050565b803560028110610b6c57600080fd5b60008060008060008060008060006101208a8c031215610c6457600080fd5b8935610c6f81610b4c565b985060208a0135975060408a013567ffffffffffffffff811115610c9257600080fd5b610c9e8c828d01610be0565b975050610cad60608b01610c36565b955060808a0135945060a08a0135935060c08a0135925060e08a0135610cd281610b4c565b91506101008a0135610ce381610b4c565b809150509295985092959850929598565b60008060008060008060008060008060006101608c8e031215610d1657600080fd5b610d1f8c610b61565b9a5060208c0135995067ffffffffffffffff8060408e01351115610d4257600080fd5b610d528e60408f01358f01610be0565b9950610d6060608e01610c36565b985060808d0135975060a08d0135965060c08d01359550610d8360e08e01610b61565b9450610d926101008e01610b61565b9350806101208e01351115610da657600080fd5b50610db88d6101208e01358e01610be0565b9150610dc76101408d01610b61565b90509295989b509295989b9093969950565b801515811461079f57600080fd5b60008060408385031215610dfa57600080fd5b823591506020830135610e0c81610dd9565b809150509250929050565b600060208284031215610e2957600080fd5b813567ffffffffffffffff811115610e4057600080fd5b610e4c84828501610be0565b949350505050565b600060208284031215610e6657600080fd5b5035919050565b600060208284031215610e7f57600080fd5b8135610b4581610b4c565b6000806000806000806000806000806101408b8d031215610eaa57600080fd5b610eb38b610b61565b995060208b0135985060408b013567ffffffffffffffff80821115610ed757600080fd5b610ee38e838f01610be0565b9950610ef160608e01610c36565b985060808d0135975060a08d0135965060c08d01359550610f1460e08e01610b61565b9450610f236101008e01610b61565b93506101208d0135915080821115610f3a57600080fd5b50610f478d828e01610be0565b9150509295989b9194979a5092959850565b60028110610f7757634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038a81168252602082018a905260408201899052610120820190610fa9606084018a610f59565b8760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b60008219821115610ffc57634e487b7160e01b600052601160045260246000fd5b500190565b60006020828403121561101357600080fd5b8151610b4581610dd9565b6000806000806080858703121561103457600080fd5b84519350602085015161104681610b4c565b604086015190935061105781610b4c565b606086015190925061106881610b4c565b939692955090935050565b60006020828403121561108557600080fd5b5051919050565b60005b838110156110a757818101518382015260200161108f565b838111156110b6576000848401525b50505050565b600081518084526110d481602086016020860161108c565b601f01601f19169290920160200192915050565b6001600160a01b038b81168252602082018b9052610140604083018190526000916111158483018d6110bc565b9250611124606085018c610f59565b60808401999099525060a082019690965260c081019490945291851660e08401529093166101008201526101200191909152949350505050565b60006020828403121561117057600080fd5b815167ffffffffffffffff81111561118757600080fd5b8201601f8101841361119857600080fd5b80516111a6610bff82610bb8565b8181528560208385010111156111bb57600080fd5b6111cc82602083016020860161108c565b95945050505050565b8381526060602082015260006111ee60608301856110bc565b828103604084015261120081856110bc565b9695505050505050565b6000825161121c81846020870161108c565b9190910192915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212209d72549d278c3cf72a69b1470daa80c7ab0f9ea68e79eb699d2bcaa6672d447064736f6c634300080d0033", "devdoc": { "kind": "dev", "methods": { @@ -515,6 +528,11 @@ }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateExecutionDelayBlocks(uint256)": { + "params": { + "_executionDelayBlocks": "The number of blocks between when a transaction is queued and can be executed" + } } }, "version": 1 @@ -539,6 +557,9 @@ }, "supportsInterface(bytes4)": { "notice": "Can be used to check if this contract supports the specified interface" + }, + "updateExecutionDelayBlocks(uint256)": { + "notice": "Updates the execution delay blocks, only callable by the owner" } }, "notice": "A guard contract that prevents transactions that have been vetoed from being executed on the Gnosis Safe", @@ -547,7 +568,7 @@ "storageLayout": { "storage": [ { - "astId": 661, + "astId": 3006, "contract": "contracts/VetoGuard.sol:VetoGuard", "label": "_initialized", "offset": 0, @@ -555,7 +576,7 @@ "type": "t_uint8" }, { - "astId": 664, + "astId": 3009, "contract": "contracts/VetoGuard.sol:VetoGuard", "label": "_initializing", "offset": 1, @@ -563,7 +584,7 @@ "type": "t_bool" }, { - "astId": 1089, + "astId": 5465, "contract": "contracts/VetoGuard.sol:VetoGuard", "label": "__gap", "offset": 0, @@ -571,7 +592,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 533, + "astId": 2800, "contract": "contracts/VetoGuard.sol:VetoGuard", "label": "_owner", "offset": 0, @@ -579,7 +600,7 @@ "type": "t_address" }, { - "astId": 653, + "astId": 2920, "contract": "contracts/VetoGuard.sol:VetoGuard", "label": "__gap", "offset": 0, @@ -587,7 +608,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 9051, + "astId": 10458, "contract": "contracts/VetoGuard.sol:VetoGuard", "label": "executionDelayBlocks", "offset": 0, @@ -595,23 +616,23 @@ "type": "t_uint256" }, { - "astId": 9054, + "astId": 10461, "contract": "contracts/VetoGuard.sol:VetoGuard", - "label": "vetoERC20Voting", + "label": "vetoVoting", "offset": 0, "slot": "102", - "type": "t_contract(IVetoERC20Voting)9803" + "type": "t_contract(IVetoVoting)11634" }, { - "astId": 9057, + "astId": 10464, "contract": "contracts/VetoGuard.sol:VetoGuard", "label": "gnosisSafe", "offset": 0, "slot": "103", - "type": "t_contract(IGnosisSafe)9717" + "type": "t_contract(IGnosisSafe)11482" }, { - "astId": 9061, + "astId": 10468, "contract": "contracts/VetoGuard.sol:VetoGuard", "label": "transactionQueuedBlock", "offset": 0, @@ -647,14 +668,14 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IGnosisSafe)9717": { + "t_contract(IGnosisSafe)11482": { "encoding": "inplace", "label": "contract IGnosisSafe", "numberOfBytes": "20" }, - "t_contract(IVetoERC20Voting)9803": { + "t_contract(IVetoVoting)11634": { "encoding": "inplace", - "label": "contract IVetoERC20Voting", + "label": "contract IVetoVoting", "numberOfBytes": "20" }, "t_mapping(t_bytes32,t_uint256)": { diff --git a/deployments/goerli/VetoMultisigVoting.json b/deployments/goerli/VetoMultisigVoting.json new file mode 100644 index 00000000..121288c1 --- /dev/null +++ b/deployments/goerli/VetoMultisigVoting.json @@ -0,0 +1,843 @@ +{ + "address": "0x8738e17E307b8d1b12847542A5E8a6b832bA97aC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "creator", + "type": "address" + } + ], + "name": "FreezeProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votesCast", + "type": "uint256" + } + ], + "name": "FreezeVoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "transactionHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votesCast", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "freeze", + "type": "bool" + } + ], + "name": "VetoVoteCast", + "type": "event" + }, + { + "inputs": [], + "name": "castFreezeVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_transactionHash", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "_freeze", + "type": "bool" + } + ], + "name": "castVetoVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defrost", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "freezeBlockDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "freezeProposalBlockDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "freezeProposalCreatedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "freezeProposalVoteCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "freezeVotesThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_transactionHash", + "type": "bytes32" + } + ], + "name": "getIsVetoed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Enum.Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "safeTxGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gasPrice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "gasToken", + "type": "address" + }, + { + "internalType": "address", + "name": "refundReceiver", + "type": "address" + } + ], + "name": "getTransactionHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisSafe", + "outputs": [ + { + "internalType": "contract IGnosisSafe", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isFrozen", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "transactionVetoVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_freezeBlockDuration", + "type": "uint256" + } + ], + "name": "updateFreezeBlockDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_freezeProposalBlockDuration", + "type": "uint256" + } + ], + "name": "updateFreezeProposalBlockDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_freezeVotesThreshold", + "type": "uint256" + } + ], + "name": "updateFreezeVotesThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_vetoVotesThreshold", + "type": "uint256" + } + ], + "name": "updateVetoVotesThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userHasFreezeVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "userHasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vetoGuard", + "outputs": [ + { + "internalType": "contract IVetoGuard", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vetoVotesThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x2e03eda9d264f700c66a5ed188ae706b4918cf3b3b351583ee5572ab83018b02", + "receipt": { + "to": null, + "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", + "contractAddress": "0x8738e17E307b8d1b12847542A5E8a6b832bA97aC", + "transactionIndex": 39, + "gasUsed": "938061", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x980fb6b0af36153a79bd3bb5a3af590fea2efe70be1d9b540d2ba5eb3d69b494", + "transactionHash": "0x2e03eda9d264f700c66a5ed188ae706b4918cf3b3b351583ee5572ab83018b02", + "logs": [], + "blockNumber": 7804428, + "cumulativeGasUsed": "9071095", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b2fc18a2e663b1410a34647a57a06e84", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"FreezeProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votesCast\",\"type\":\"uint256\"}],\"name\":\"FreezeVoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"transactionHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votesCast\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"freeze\",\"type\":\"bool\"}],\"name\":\"VetoVoteCast\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"castFreezeVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_transactionHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_freeze\",\"type\":\"bool\"}],\"name\":\"castVetoVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defrost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeBlockDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalBlockDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalCreatedBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProposalVoteCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeVotesThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_transactionHash\",\"type\":\"bytes32\"}],\"name\":\"getIsVetoed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum Enum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"}],\"name\":\"getTransactionHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisSafe\",\"outputs\":[{\"internalType\":\"contract IGnosisSafe\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transactionVetoVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeBlockDuration\",\"type\":\"uint256\"}],\"name\":\"updateFreezeBlockDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeProposalBlockDuration\",\"type\":\"uint256\"}],\"name\":\"updateFreezeProposalBlockDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_freezeVotesThreshold\",\"type\":\"uint256\"}],\"name\":\"updateFreezeVotesThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vetoVotesThreshold\",\"type\":\"uint256\"}],\"name\":\"updateVetoVotesThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"userHasFreezeVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"userHasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vetoGuard\",\"outputs\":[{\"internalType\":\"contract IVetoGuard\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vetoVotesThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"castVetoVote(bytes32,bool)\":{\"params\":{\"_freeze\":\"Bool indicating whether the voter thinks the DAO should also be frozen\",\"_transactionHash\":\"The hash of the transaction data\"}},\"getIsVetoed(bytes32)\":{\"params\":{\"_transactionHash\":\"The hash of the transaction data\"},\"returns\":{\"_0\":\"bool True if the transaction is vetoed\"}},\"getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)\":{\"details\":\"Returns the hash of all the transaction dataIt is important to note that this implementation is different than that in the Gnosis Safe contractThis implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interfaceThis implementation also omits the EIP-712 related values, since these hashes are not being signed by users\",\"params\":{\"baseGas\":\"Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\",\"data\":\"Data payload.\",\"gasPrice\":\"Maximum gas price that should be used for this transaction.\",\"gasToken\":\"Token address (or 0 if ETH) that is used for the payment.\",\"operation\":\"Operation type.\",\"refundReceiver\":\"Address of receiver of gas payment (or 0 if tx.origin).\",\"safeTxGas\":\"Gas that should be used for the safe transaction.\",\"to\":\"Destination address.\",\"value\":\"Ether value.\"},\"returns\":{\"_0\":\"Transaction hash bytes.\"}},\"isFrozen()\":{\"returns\":{\"_0\":\"bool Indicates whether the DAO is currently frozen\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateFreezeBlockDuration(uint256)\":{\"params\":{\"_freezeBlockDuration\":\"The number of blocks a freeze last, from time of freeze proposal creation\"}},\"updateFreezeProposalBlockDuration(uint256)\":{\"params\":{\"_freezeProposalBlockDuration\":\"The number of blocks a freeze proposal has to succeed\"}},\"updateFreezeVotesThreshold(uint256)\":{\"params\":{\"_freezeVotesThreshold\":\"Number of freeze votes required to activate a freeze\"}},\"updateVetoVotesThreshold(uint256)\":{\"params\":{\"_vetoVotesThreshold\":\"The number of votes required to veto a transaction\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"castFreezeVote()\":{\"notice\":\"Allows user to cast a freeze vote, creating a freeze proposal if necessary\"},\"castVetoVote(bytes32,bool)\":{\"notice\":\"Allows the msg.sender to cast veto and freeze votes on the specified transaction\"},\"defrost()\":{\"notice\":\"Unfreezes the DAO, only callable by the owner\"},\"getIsVetoed(bytes32)\":{\"notice\":\"Returns whether the specified transaction has been vetoed\"},\"isFrozen()\":{\"notice\":\"Returns true if the DAO is currently frozen, false otherwise\"},\"setUp(bytes)\":{\"notice\":\"Initialize function, will be triggered when a new proxy is deployed\"},\"updateFreezeBlockDuration(uint256)\":{\"notice\":\"Updates the freeze block duration, only callable by the owner\"},\"updateFreezeProposalBlockDuration(uint256)\":{\"notice\":\"Updates the freeze proposal blocks duration, only callable by the owner\"},\"updateFreezeVotesThreshold(uint256)\":{\"notice\":\"Updates the freeze votes threshold, only callable by the owner\"},\"updateVetoVotesThreshold(uint256)\":{\"notice\":\"Updates the veto votes threshold, only callable by the owner\"}},\"notice\":\"A contract for a parent Multisig DAO to cast veto and freeze votes on a child DAO\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/VetoMultisigVoting.sol\":\"VetoMultisigVoting\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"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\"},\"contracts/TransactionHasher.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\nabstract contract TransactionHasher {\\r\\n /// @dev Returns the hash of all the transaction data\\r\\n /// @dev It is important to note that this implementation is different than that in the Gnosis Safe contract\\r\\n /// @dev This implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interface\\r\\n /// @dev This implementation also omits the EIP-712 related values, since these hashes are not being signed by users\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @return Transaction hash bytes.\\r\\n function getTransactionHash(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address refundReceiver\\r\\n ) public pure returns (bytes32) {\\r\\n return keccak256(\\r\\n abi.encode(\\r\\n to,\\r\\n value,\\r\\n keccak256(data),\\r\\n operation,\\r\\n safeTxGas,\\r\\n baseGas,\\r\\n gasPrice,\\r\\n gasToken,\\r\\n refundReceiver\\r\\n )\\r\\n );\\r\\n }\\r\\n}\",\"keccak256\":\"0x1d6ca309cc27debd165993a3929e3bdd0de8eb3c3eff79e86479ce4e2955e16d\",\"license\":\"Unlicense\"},\"contracts/VetoMultisigVoting.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"./interfaces/IVetoGuard.sol\\\";\\r\\nimport \\\"./interfaces/IVetoVoting.sol\\\";\\r\\nimport \\\"./interfaces/IGnosisSafe.sol\\\";\\r\\nimport \\\"./TransactionHasher.sol\\\";\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\r\\n\\r\\n/// @notice A contract for a parent Multisig DAO to cast veto and freeze votes on a child DAO\\r\\ncontract VetoMultisigVoting is IVetoVoting, TransactionHasher, FactoryFriendly {\\r\\n uint256 public vetoVotesThreshold; // Number of votes required to veto a transaction\\r\\n uint256 public freezeVotesThreshold; // Number of freeze votes required to activate a freeze\\r\\n uint256 public freezeProposalCreatedBlock; // Block number the freeze proposal was created at\\r\\n uint256 public freezeProposalVoteCount; // Number of accrued freeze votes\\r\\n uint256 public freezeProposalBlockDuration; // Number of blocks a freeze proposal has to succeed\\r\\n uint256 public freezeBlockDuration; // Number of blocks a freeze lasts, from time of freeze proposal creation\\r\\n IGnosisSafe public gnosisSafe;\\r\\n IVetoGuard public vetoGuard;\\r\\n mapping(bytes32 => uint256) public transactionVetoVotes;\\r\\n mapping(address => mapping(bytes32 => bool)) public userHasVoted;\\r\\n mapping(address => mapping(uint256 => bool)) public userHasFreezeVoted;\\r\\n\\r\\n /// @notice Initialize function, will be triggered when a new proxy is deployed\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n __Ownable_init();\\r\\n (\\r\\n address _owner,\\r\\n uint256 _vetoVotesThreshold,\\r\\n uint256 _freezeVotesThreshold,\\r\\n uint256 _freezeProposalBlockDuration,\\r\\n uint256 _freezeBlockDuration,\\r\\n address _parentGnosisSafe,\\r\\n address _vetoGuard\\r\\n ) = abi.decode(\\r\\n initializeParams,\\r\\n (address, uint256, uint256, uint256, uint256, address, address)\\r\\n );\\r\\n\\r\\n _transferOwnership(_owner);\\r\\n vetoVotesThreshold = _vetoVotesThreshold;\\r\\n freezeVotesThreshold = _freezeVotesThreshold;\\r\\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\\r\\n freezeBlockDuration = _freezeBlockDuration;\\r\\n gnosisSafe = IGnosisSafe(_parentGnosisSafe);\\r\\n vetoGuard = IVetoGuard(_vetoGuard);\\r\\n }\\r\\n\\r\\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\\r\\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external {\\r\\n // Check that user has not yet voted\\r\\n require(\\r\\n !userHasVoted[msg.sender][_transactionHash],\\r\\n \\\"User has already voted\\\"\\r\\n );\\r\\n\\r\\n require(gnosisSafe.isOwner(msg.sender), \\\"User is not an owner \\\");\\r\\n\\r\\n // Check that the transaction has been queued\\r\\n require(\\r\\n vetoGuard.getTransactionQueuedBlock(_transactionHash) != 0,\\r\\n \\\"Transaction has not yet been queued\\\"\\r\\n );\\r\\n\\r\\n // Add the user votes to the veto vote count for this transaction\\r\\n transactionVetoVotes[_transactionHash]++;\\r\\n\\r\\n // If the user is voting to freeze, count that vote as well\\r\\n if (_freeze) {\\r\\n _castFreezeVote();\\r\\n }\\r\\n\\r\\n // User has voted\\r\\n userHasVoted[msg.sender][_transactionHash] = true;\\r\\n\\r\\n emit VetoVoteCast(msg.sender, _transactionHash, 1, _freeze);\\r\\n }\\r\\n\\r\\n /// @notice Allows user to cast a freeze vote, creating a freeze proposal if necessary\\r\\n function castFreezeVote() external {\\r\\n require(gnosisSafe.isOwner(msg.sender), \\\"User is not an owner \\\");\\r\\n\\r\\n _castFreezeVote();\\r\\n }\\r\\n\\r\\n /// @notice Allows user to cast a freeze vote, creating a freeze proposal if necessary\\r\\n function _castFreezeVote() internal {\\r\\n if (\\r\\n block.number >\\r\\n freezeProposalCreatedBlock + freezeProposalBlockDuration\\r\\n ) {\\r\\n // Create freeze proposal, count user's vote\\r\\n freezeProposalCreatedBlock = block.number;\\r\\n\\r\\n freezeProposalVoteCount = 1;\\r\\n\\r\\n emit FreezeProposalCreated(msg.sender);\\r\\n } else {\\r\\n // There is an existing freeze proposal, count user's vote\\r\\n require(\\r\\n !userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock],\\r\\n \\\"User has already voted\\\"\\r\\n );\\r\\n\\r\\n freezeProposalVoteCount++;\\r\\n }\\r\\n\\r\\n userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock] = true;\\r\\n\\r\\n emit FreezeVoteCast(msg.sender, 1);\\r\\n }\\r\\n\\r\\n /// @notice Unfreezes the DAO, only callable by the owner\\r\\n function defrost() public onlyOwner {\\r\\n freezeProposalCreatedBlock = 0;\\r\\n freezeProposalVoteCount = 0;\\r\\n }\\r\\n\\r\\n /// @notice Updates the veto votes threshold, only callable by the owner\\r\\n /// @param _vetoVotesThreshold The number of votes required to veto a transaction\\r\\n function updateVetoVotesThreshold(uint256 _vetoVotesThreshold)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n vetoVotesThreshold = _vetoVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze votes threshold, only callable by the owner\\r\\n /// @param _freezeVotesThreshold Number of freeze votes required to activate a freeze\\r\\n function updateFreezeVotesThreshold(uint256 _freezeVotesThreshold)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n freezeVotesThreshold = _freezeVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze proposal blocks duration, only callable by the owner\\r\\n /// @param _freezeProposalBlockDuration The number of blocks a freeze proposal has to succeed\\r\\n function updateFreezeProposalBlockDuration(\\r\\n uint256 _freezeProposalBlockDuration\\r\\n ) external onlyOwner {\\r\\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\\r\\n }\\r\\n\\r\\n /// @notice Updates the freeze block duration, only callable by the owner\\r\\n /// @param _freezeBlockDuration The number of blocks a freeze last, from time of freeze proposal creation\\r\\n function updateFreezeBlockDuration(uint256 _freezeBlockDuration)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n freezeBlockDuration = _freezeBlockDuration;\\r\\n }\\r\\n\\r\\n /// @notice Returns whether the specified transaction has been vetoed\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return bool True if the transaction is vetoed\\r\\n function getIsVetoed(bytes32 _transactionHash)\\r\\n external\\r\\n view\\r\\n returns (bool)\\r\\n {\\r\\n return transactionVetoVotes[_transactionHash] >= vetoVotesThreshold;\\r\\n }\\r\\n\\r\\n /// @notice Returns true if the DAO is currently frozen, false otherwise\\r\\n /// @return bool Indicates whether the DAO is currently frozen\\r\\n function isFrozen() public view returns (bool) {\\r\\n if (\\r\\n freezeProposalVoteCount >= freezeVotesThreshold &&\\r\\n block.number < freezeProposalCreatedBlock + freezeBlockDuration\\r\\n ) {\\r\\n return true;\\r\\n }\\r\\n\\r\\n return false;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x8d8b667e0567eff17fe84936047ff64fefc261dd67676df8f84fbbd31ff969b4\",\"license\":\"Unlicense\"},\"contracts/interfaces/IGnosisSafe.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IGnosisSafe {\\r\\n function nonce() external view returns (uint256);\\r\\n\\r\\n /// @dev Setup function sets initial storage of contract.\\r\\n /// @param _owners List of Safe owners.\\r\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\r\\n /// @param to Contract address for optional delegate call.\\r\\n /// @param data Data payload for optional delegate call.\\r\\n /// @param fallbackHandler Handler for fallback calls to this contract\\r\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\r\\n /// @param payment Value that should be paid\\r\\n /// @param paymentReceiver Address that should receive the payment (or 0 if tx.origin)\\r\\n function setup(\\r\\n address[] calldata _owners,\\r\\n uint256 _threshold,\\r\\n address to,\\r\\n bytes calldata data,\\r\\n address fallbackHandler,\\r\\n address paymentToken,\\r\\n uint256 payment,\\r\\n address payable paymentReceiver\\r\\n ) external;\\r\\n\\r\\n function setGuard(address guard) external;\\r\\n\\r\\n function execTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes calldata data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external payable returns (bool success);\\r\\n\\r\\n /**\\r\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\r\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\r\\n * @param data That should be signed (this is passed to an external validator contract)\\r\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\r\\n */\\r\\n function checkSignatures(\\r\\n bytes32 dataHash,\\r\\n bytes memory data,\\r\\n bytes memory signatures\\r\\n ) external view;\\r\\n\\r\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param _nonce Transaction nonce.\\r\\n /// @return Transaction hash bytes.\\r\\n function encodeTransactionData(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes calldata data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address refundReceiver,\\r\\n uint256 _nonce\\r\\n ) external view returns (bytes memory);\\r\\n\\r\\n /// @notice Returns whether the passed address is an owner\\r\\n /// @param owner The address the check\\r\\n /// @return bool True if the address is an owner\\r\\n function isOwner(address owner) external view returns (bool);\\r\\n}\\r\\n\",\"keccak256\":\"0x33a81b26efda8a950aad179b62224606fd89ae98f669540363aa1cc7266b37b8\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoGuard.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoGuard {\\r\\n event VetoGuardSetup(\\r\\n address creator,\\r\\n uint256 executionDelayBlocks,\\r\\n address indexed owner,\\r\\n address indexed vetoERC20Voting\\r\\n );\\r\\n\\r\\n event TransactionQueued(\\r\\n address indexed queuer,\\r\\n bytes32 indexed transactionHash,\\r\\n bytes indexed signatures\\r\\n );\\r\\n\\r\\n /// @notice Allows a user to queue the transaction, requires valid signatures\\r\\n /// @param to Destination address.\\r\\n /// @param value Ether value.\\r\\n /// @param data Data payload.\\r\\n /// @param operation Operation type.\\r\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\r\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\r\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\r\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\r\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\r\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\r\\n function queueTransaction(\\r\\n address to,\\r\\n uint256 value,\\r\\n bytes memory data,\\r\\n Enum.Operation operation,\\r\\n uint256 safeTxGas,\\r\\n uint256 baseGas,\\r\\n uint256 gasPrice,\\r\\n address gasToken,\\r\\n address payable refundReceiver,\\r\\n bytes memory signatures\\r\\n ) external;\\r\\n\\r\\n /// @notice Updates the execution delay blocks\\r\\n /// @param _executionDelayBlocks The number of blocks between when a transaction is queued and can be executed\\r\\n function updateExecutionDelayBlocks(\\r\\n uint256 _executionDelayBlocks\\r\\n ) external;\\r\\n\\r\\n /// @notice Gets the block number that the transaction was queued at\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return uint256 The block number\\r\\n function getTransactionQueuedBlock(bytes32 _transactionHash)\\r\\n external\\r\\n view\\r\\n returns (uint256);\\r\\n}\\r\\n\",\"keccak256\":\"0x0b11f06f35570cc8ea2ba2c4247fb87f20b5adfa6d55a2dc25c4e3ef981130ad\",\"license\":\"Unlicense\"},\"contracts/interfaces/IVetoVoting.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\r\\n\\r\\ninterface IVetoVoting {\\r\\n event VetoVoteCast(\\r\\n address indexed voter,\\r\\n bytes32 indexed transactionHash,\\r\\n uint256 votesCast,\\r\\n bool freeze\\r\\n );\\r\\n\\r\\n event FreezeVoteCast(address indexed voter, uint256 votesCast);\\r\\n\\r\\n event FreezeProposalCreated(address indexed creator);\\r\\n\\r\\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\\r\\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external;\\r\\n\\r\\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\\r\\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\\r\\n function castFreezeVote() external;\\r\\n\\r\\n /// @notice Returns whether the specified transaction has been vetoed\\r\\n /// @param _transactionHash The hash of the transaction data\\r\\n /// @return bool True if the transaction is vetoed\\r\\n function getIsVetoed(bytes32 _transactionHash) external view returns (bool);\\r\\n\\r\\n /// @notice Returns true if the DAO is currently frozen, false otherwise\\r\\n /// @return bool Indicates whether the DAO is currently frozen\\r\\n function isFrozen() external view returns (bool);\\r\\n}\\r\\n\",\"keccak256\":\"0x13e262efc0a67242c311292283d8c93c3783536a8bb24ae9a240c4757874a5b9\",\"license\":\"Unlicense\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611001806100206000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c8063a1cb3ed4116100de578063aba9dfe911610097578063e9c17a9411610071578063e9c17a941461034b578063f21cdf6f14610354578063f2fde38b1461035c578063fb80bccc1461036f57600080fd5b8063aba9dfe9146102ff578063e0b44b5a14610312578063e1a411521461032557600080fd5b8063a1cb3ed4146102a2578063a28e6f4a146102b5578063a3fb4897146102be578063a4f9edbf146102d1578063a84173ae146102e4578063a91e5cab146102f757600080fd5b80636e062eff116101305780636e062eff14610216578063715018a61461022b5780638a79cadf146102335780638da5cb5b1461023c5780638f920e1814610261578063919d8fdf1461028f57600080fd5b806301c4f974146101785780631f82bcb1146101ab57806333eeb147146101e957806349a6a4fa146101f1578063559a24e3146101fa57806365d5d08c14610203575b600080fd5b610198610186366004610bba565b606d6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101d96101b9366004610bf8565b606e60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101a2565b6101d9610378565b61019860695481565b61019860675481565b610198610211366004610cc7565b6103ad565b610229610224366004610d86565b6103fc565b005b610229610674565b61019860685481565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101a2565b6101d961026f366004610bf8565b606f60209081526000928352604080842090915290825290205460ff1681565b61022961029d366004610bba565b610688565b6102296102b0366004610bba565b610695565b610198606a5481565b606c54610249906001600160a01b031681565b6102296102df366004610db6565b6106a2565b606b54610249906001600160a01b031681565b61022961082c565b61022961030d366004610bba565b6108e4565b610229610320366004610bba565b6108f1565b6101d9610333366004610bba565b6065546000918252606d602052604090912054101590565b61019860655481565b6102296108fe565b61022961036a366004610df3565b610912565b61019860665481565b60006066546068541015801561039c5750606a546067546103999190610e2d565b43105b156103a75750600190565b50600090565b6000898989805190602001208989898989896040516020016103d799989796959493929190610e45565b6040516020818303038152906040528051906020012090509998505050505050505050565b336000908152606e6020908152604080832085845290915290205460ff16156104655760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b60448201526064015b60405180910390fd5b606b546040516317aa5fb760e11b81523360048201526001600160a01b0390911690632f54bf6e90602401602060405180830381865afa1580156104ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d19190610ebc565b6105155760405162461bcd60e51b815260206004820152601560248201527402ab9b2b91034b9903737ba1030b71037bbb732b91605d1b604482015260640161045c565b606c5460405163b59ee1db60e01b8152600481018490526001600160a01b039091169063b59ee1db90602401602060405180830381865afa15801561055e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105829190610ed9565b6000036105dd5760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f7420796574206265656e207175656044820152621d595960ea1b606482015260840161045c565b6000828152606d602052604081208054916105f783610ef2565b9190505550801561060a5761060a61098b565b336000818152606e60209081526040808320868452825291829020805460ff191660019081179091558251908152841515918101919091528492917f3ff8c993f53ae62959a2df610fd0d5cff5320cd2a5f907e1a9f785499e402d84910160405180910390a35050565b61067c610ab4565b6106866000610b0e565b565b610690610ab4565b606555565b61069d610ab4565b606a55565b600054610100900460ff16158080156106c25750600054600160ff909116105b806106dc5750303b1580156106dc575060005460ff166001145b61073f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161045c565b6000805460ff191660011790558015610762576000805461ff0019166101001790555b61076a610b60565b6000806000806000806000888060200190518101906107899190610f0b565b96509650965096509650965096506107a087610b0e565b606595909555606693909355606991909155606a55606b80546001600160a01b039283166001600160a01b031991821617909155606c8054929093169116179055508015610828576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b606b546040516317aa5fb760e11b81523360048201526001600160a01b0390911690632f54bf6e90602401602060405180830381865afa158015610874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108989190610ebc565b6108dc5760405162461bcd60e51b815260206004820152601560248201527402ab9b2b91034b9903737ba1030b71037bbb732b91605d1b604482015260640161045c565b61068661098b565b6108ec610ab4565b606655565b6108f9610ab4565b606955565b610906610ab4565b60006067819055606855565b61091a610ab4565b6001600160a01b03811661097f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045c565b61098881610b0e565b50565b60695460675461099b9190610e2d565b4311156109db5743606755600160685560405133907fe18d0e7e892cd73f8a648a42186da382bee61a1d78ac88401885943449f78fe490600090a2610a57565b336000908152606f60209081526040808320606754845290915290205460ff1615610a415760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b604482015260640161045c565b60688054906000610a5183610ef2565b91905055505b336000818152606f602090815260408083206067548452825291829020805460ff1916600190811790915591519182527f3746cafa4f96166ea7502cf76d1ea8ce440f3c8215cbcac3ae32d3ee39afae42910160405180910390a2565b6033546001600160a01b031633146106865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b875760405162461bcd60e51b815260040161045c90610f80565b610686600054610100900460ff16610bb15760405162461bcd60e51b815260040161045c90610f80565b61068633610b0e565b600060208284031215610bcc57600080fd5b5035919050565b6001600160a01b038116811461098857600080fd5b8035610bf381610bd3565b919050565b60008060408385031215610c0b57600080fd5b8235610c1681610bd3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610c4b57600080fd5b813567ffffffffffffffff80821115610c6657610c66610c24565b604051601f8301601f19908116603f01168101908282118183101715610c8e57610c8e610c24565b81604052838152866020858801011115610ca757600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060008060006101208a8c031215610ce657600080fd5b8935610cf181610bd3565b985060208a0135975060408a013567ffffffffffffffff811115610d1457600080fd5b610d208c828d01610c3a565b97505060608a013560028110610d3557600080fd5b955060808a0135945060a08a0135935060c08a0135925060e08a0135610d5a81610bd3565b9150610d696101008b01610be8565b90509295985092959850929598565b801515811461098857600080fd5b60008060408385031215610d9957600080fd5b823591506020830135610dab81610d78565b809150509250929050565b600060208284031215610dc857600080fd5b813567ffffffffffffffff811115610ddf57600080fd5b610deb84828501610c3a565b949350505050565b600060208284031215610e0557600080fd5b8135610e1081610bd3565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610e4057610e40610e17565b500190565b6001600160a01b038a81168252602082018a90526040820189905261012082019060028910610e8457634e487b7160e01b600052602160045260246000fd5b8860608401528760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b600060208284031215610ece57600080fd5b8151610e1081610d78565b600060208284031215610eeb57600080fd5b5051919050565b600060018201610f0457610f04610e17565b5060010190565b600080600080600080600060e0888a031215610f2657600080fd5b8751610f3181610bd3565b809750506020880151955060408801519450606088015193506080880151925060a0880151610f5f81610bd3565b60c0890151909250610f7081610bd3565b8091505092959891949750929550565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220b2c5040d9e38050598ae8807606f0f69f3e70208e774d13c14800f35dc98ec3f64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c8063a1cb3ed4116100de578063aba9dfe911610097578063e9c17a9411610071578063e9c17a941461034b578063f21cdf6f14610354578063f2fde38b1461035c578063fb80bccc1461036f57600080fd5b8063aba9dfe9146102ff578063e0b44b5a14610312578063e1a411521461032557600080fd5b8063a1cb3ed4146102a2578063a28e6f4a146102b5578063a3fb4897146102be578063a4f9edbf146102d1578063a84173ae146102e4578063a91e5cab146102f757600080fd5b80636e062eff116101305780636e062eff14610216578063715018a61461022b5780638a79cadf146102335780638da5cb5b1461023c5780638f920e1814610261578063919d8fdf1461028f57600080fd5b806301c4f974146101785780631f82bcb1146101ab57806333eeb147146101e957806349a6a4fa146101f1578063559a24e3146101fa57806365d5d08c14610203575b600080fd5b610198610186366004610bba565b606d6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101d96101b9366004610bf8565b606e60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101a2565b6101d9610378565b61019860695481565b61019860675481565b610198610211366004610cc7565b6103ad565b610229610224366004610d86565b6103fc565b005b610229610674565b61019860685481565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101a2565b6101d961026f366004610bf8565b606f60209081526000928352604080842090915290825290205460ff1681565b61022961029d366004610bba565b610688565b6102296102b0366004610bba565b610695565b610198606a5481565b606c54610249906001600160a01b031681565b6102296102df366004610db6565b6106a2565b606b54610249906001600160a01b031681565b61022961082c565b61022961030d366004610bba565b6108e4565b610229610320366004610bba565b6108f1565b6101d9610333366004610bba565b6065546000918252606d602052604090912054101590565b61019860655481565b6102296108fe565b61022961036a366004610df3565b610912565b61019860665481565b60006066546068541015801561039c5750606a546067546103999190610e2d565b43105b156103a75750600190565b50600090565b6000898989805190602001208989898989896040516020016103d799989796959493929190610e45565b6040516020818303038152906040528051906020012090509998505050505050505050565b336000908152606e6020908152604080832085845290915290205460ff16156104655760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b60448201526064015b60405180910390fd5b606b546040516317aa5fb760e11b81523360048201526001600160a01b0390911690632f54bf6e90602401602060405180830381865afa1580156104ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d19190610ebc565b6105155760405162461bcd60e51b815260206004820152601560248201527402ab9b2b91034b9903737ba1030b71037bbb732b91605d1b604482015260640161045c565b606c5460405163b59ee1db60e01b8152600481018490526001600160a01b039091169063b59ee1db90602401602060405180830381865afa15801561055e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105829190610ed9565b6000036105dd5760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e20686173206e6f7420796574206265656e207175656044820152621d595960ea1b606482015260840161045c565b6000828152606d602052604081208054916105f783610ef2565b9190505550801561060a5761060a61098b565b336000818152606e60209081526040808320868452825291829020805460ff191660019081179091558251908152841515918101919091528492917f3ff8c993f53ae62959a2df610fd0d5cff5320cd2a5f907e1a9f785499e402d84910160405180910390a35050565b61067c610ab4565b6106866000610b0e565b565b610690610ab4565b606555565b61069d610ab4565b606a55565b600054610100900460ff16158080156106c25750600054600160ff909116105b806106dc5750303b1580156106dc575060005460ff166001145b61073f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161045c565b6000805460ff191660011790558015610762576000805461ff0019166101001790555b61076a610b60565b6000806000806000806000888060200190518101906107899190610f0b565b96509650965096509650965096506107a087610b0e565b606595909555606693909355606991909155606a55606b80546001600160a01b039283166001600160a01b031991821617909155606c8054929093169116179055508015610828576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b606b546040516317aa5fb760e11b81523360048201526001600160a01b0390911690632f54bf6e90602401602060405180830381865afa158015610874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108989190610ebc565b6108dc5760405162461bcd60e51b815260206004820152601560248201527402ab9b2b91034b9903737ba1030b71037bbb732b91605d1b604482015260640161045c565b61068661098b565b6108ec610ab4565b606655565b6108f9610ab4565b606955565b610906610ab4565b60006067819055606855565b61091a610ab4565b6001600160a01b03811661097f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045c565b61098881610b0e565b50565b60695460675461099b9190610e2d565b4311156109db5743606755600160685560405133907fe18d0e7e892cd73f8a648a42186da382bee61a1d78ac88401885943449f78fe490600090a2610a57565b336000908152606f60209081526040808320606754845290915290205460ff1615610a415760405162461bcd60e51b8152602060048201526016602482015275155cd95c881a185cc8185b1c9958591e481d9bdd195960521b604482015260640161045c565b60688054906000610a5183610ef2565b91905055505b336000818152606f602090815260408083206067548452825291829020805460ff1916600190811790915591519182527f3746cafa4f96166ea7502cf76d1ea8ce440f3c8215cbcac3ae32d3ee39afae42910160405180910390a2565b6033546001600160a01b031633146106865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b875760405162461bcd60e51b815260040161045c90610f80565b610686600054610100900460ff16610bb15760405162461bcd60e51b815260040161045c90610f80565b61068633610b0e565b600060208284031215610bcc57600080fd5b5035919050565b6001600160a01b038116811461098857600080fd5b8035610bf381610bd3565b919050565b60008060408385031215610c0b57600080fd5b8235610c1681610bd3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610c4b57600080fd5b813567ffffffffffffffff80821115610c6657610c66610c24565b604051601f8301601f19908116603f01168101908282118183101715610c8e57610c8e610c24565b81604052838152866020858801011115610ca757600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060008060006101208a8c031215610ce657600080fd5b8935610cf181610bd3565b985060208a0135975060408a013567ffffffffffffffff811115610d1457600080fd5b610d208c828d01610c3a565b97505060608a013560028110610d3557600080fd5b955060808a0135945060a08a0135935060c08a0135925060e08a0135610d5a81610bd3565b9150610d696101008b01610be8565b90509295985092959850929598565b801515811461098857600080fd5b60008060408385031215610d9957600080fd5b823591506020830135610dab81610d78565b809150509250929050565b600060208284031215610dc857600080fd5b813567ffffffffffffffff811115610ddf57600080fd5b610deb84828501610c3a565b949350505050565b600060208284031215610e0557600080fd5b8135610e1081610bd3565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610e4057610e40610e17565b500190565b6001600160a01b038a81168252602082018a90526040820189905261012082019060028910610e8457634e487b7160e01b600052602160045260246000fd5b8860608401528760808401528660a08401528560c084015280851660e0840152808416610100840152509a9950505050505050505050565b600060208284031215610ece57600080fd5b8151610e1081610d78565b600060208284031215610eeb57600080fd5b5051919050565b600060018201610f0457610f04610e17565b5060010190565b600080600080600080600060e0888a031215610f2657600080fd5b8751610f3181610bd3565b809750506020880151955060408801519450606088015193506080880151925060a0880151610f5f81610bd3565b60c0890151909250610f7081610bd3565b8091505092959891949750929550565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220b2c5040d9e38050598ae8807606f0f69f3e70208e774d13c14800f35dc98ec3f64736f6c634300080d0033", + "devdoc": { + "kind": "dev", + "methods": { + "castVetoVote(bytes32,bool)": { + "params": { + "_freeze": "Bool indicating whether the voter thinks the DAO should also be frozen", + "_transactionHash": "The hash of the transaction data" + } + }, + "getIsVetoed(bytes32)": { + "params": { + "_transactionHash": "The hash of the transaction data" + }, + "returns": { + "_0": "bool True if the transaction is vetoed" + } + }, + "getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address)": { + "details": "Returns the hash of all the transaction dataIt is important to note that this implementation is different than that in the Gnosis Safe contractThis implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interfaceThis implementation also omits the EIP-712 related values, since these hashes are not being signed by users", + "params": { + "baseGas": "Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)", + "data": "Data payload.", + "gasPrice": "Maximum gas price that should be used for this transaction.", + "gasToken": "Token address (or 0 if ETH) that is used for the payment.", + "operation": "Operation type.", + "refundReceiver": "Address of receiver of gas payment (or 0 if tx.origin).", + "safeTxGas": "Gas that should be used for the safe transaction.", + "to": "Destination address.", + "value": "Ether value." + }, + "returns": { + "_0": "Transaction hash bytes." + } + }, + "isFrozen()": { + "returns": { + "_0": "bool Indicates whether the DAO is currently frozen" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setUp(bytes)": { + "params": { + "initializeParams": "Parameters of initialization encoded" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateFreezeBlockDuration(uint256)": { + "params": { + "_freezeBlockDuration": "The number of blocks a freeze last, from time of freeze proposal creation" + } + }, + "updateFreezeProposalBlockDuration(uint256)": { + "params": { + "_freezeProposalBlockDuration": "The number of blocks a freeze proposal has to succeed" + } + }, + "updateFreezeVotesThreshold(uint256)": { + "params": { + "_freezeVotesThreshold": "Number of freeze votes required to activate a freeze" + } + }, + "updateVetoVotesThreshold(uint256)": { + "params": { + "_vetoVotesThreshold": "The number of votes required to veto a transaction" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "castFreezeVote()": { + "notice": "Allows user to cast a freeze vote, creating a freeze proposal if necessary" + }, + "castVetoVote(bytes32,bool)": { + "notice": "Allows the msg.sender to cast veto and freeze votes on the specified transaction" + }, + "defrost()": { + "notice": "Unfreezes the DAO, only callable by the owner" + }, + "getIsVetoed(bytes32)": { + "notice": "Returns whether the specified transaction has been vetoed" + }, + "isFrozen()": { + "notice": "Returns true if the DAO is currently frozen, false otherwise" + }, + "setUp(bytes)": { + "notice": "Initialize function, will be triggered when a new proxy is deployed" + }, + "updateFreezeBlockDuration(uint256)": { + "notice": "Updates the freeze block duration, only callable by the owner" + }, + "updateFreezeProposalBlockDuration(uint256)": { + "notice": "Updates the freeze proposal blocks duration, only callable by the owner" + }, + "updateFreezeVotesThreshold(uint256)": { + "notice": "Updates the freeze votes threshold, only callable by the owner" + }, + "updateVetoVotesThreshold(uint256)": { + "notice": "Updates the veto votes threshold, only callable by the owner" + } + }, + "notice": "A contract for a parent Multisig DAO to cast veto and freeze votes on a child DAO", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3006, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 3009, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 5465, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2800, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 2920, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 10799, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "vetoVotesThreshold", + "offset": 0, + "slot": "101", + "type": "t_uint256" + }, + { + "astId": 10801, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "freezeVotesThreshold", + "offset": 0, + "slot": "102", + "type": "t_uint256" + }, + { + "astId": 10803, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "freezeProposalCreatedBlock", + "offset": 0, + "slot": "103", + "type": "t_uint256" + }, + { + "astId": 10805, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "freezeProposalVoteCount", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 10807, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "freezeProposalBlockDuration", + "offset": 0, + "slot": "105", + "type": "t_uint256" + }, + { + "astId": 10809, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "freezeBlockDuration", + "offset": 0, + "slot": "106", + "type": "t_uint256" + }, + { + "astId": 10812, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "gnosisSafe", + "offset": 0, + "slot": "107", + "type": "t_contract(IGnosisSafe)11482" + }, + { + "astId": 10815, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "vetoGuard", + "offset": 0, + "slot": "108", + "type": "t_contract(IVetoGuard)11584" + }, + { + "astId": 10819, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "transactionVetoVotes", + "offset": 0, + "slot": "109", + "type": "t_mapping(t_bytes32,t_uint256)" + }, + { + "astId": 10825, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "userHasVoted", + "offset": 0, + "slot": "110", + "type": "t_mapping(t_address,t_mapping(t_bytes32,t_bool))" + }, + { + "astId": 10831, + "contract": "contracts/VetoMultisigVoting.sol:VetoMultisigVoting", + "label": "userHasFreezeVoted", + "offset": 0, + "slot": "111", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IGnosisSafe)11482": { + "encoding": "inplace", + "label": "contract IGnosisSafe", + "numberOfBytes": "20" + }, + "t_contract(IVetoGuard)11584": { + "encoding": "inplace", + "label": "contract IVetoGuard", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_bytes32,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(bytes32 => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_bool)" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_bool)" + }, + "t_mapping(t_bytes32,t_bool)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_bool)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/goerli/VotesToken.json b/deployments/goerli/VotesToken.json new file mode 100644 index 00000000..6ebc1074 --- /dev/null +++ b/deployments/goerli/VotesToken.json @@ -0,0 +1,1290 @@ +{ + "address": "0x0697DCa73151da93D18CDdF5DB52f9A8363c9Ba9", + "abi": [ + { + "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": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "captureSnapShot", + "outputs": [ + { + "internalType": "uint256", + "name": "snapId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20VotesUpgradeable.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x35dff22517e3a1651999caa3eab035ba202d5698b08aa3c0b2dafbfac7fecb3f", + "receipt": { + "to": null, + "from": "0x346658f99924B8Cfe8b6A2418070192385848CA9", + "contractAddress": "0x0697DCa73151da93D18CDdF5DB52f9A8363c9Ba9", + "transactionIndex": 57, + "gasUsed": "2310065", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x54ee40ae73027272f35892523b9322b9ef6bef765a6b75e71e5697c6f6304034", + "transactionHash": "0x35dff22517e3a1651999caa3eab035ba202d5698b08aa3c0b2dafbfac7fecb3f", + "logs": [], + "blockNumber": 7804431, + "cumulativeGasUsed": "14273358", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "b2fc18a2e663b1410a34647a57a06e84", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"captureSnapShot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"snapId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"pos\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint224\",\"name\":\"votes\",\"type\":\"uint224\"}],\"internalType\":\"struct ERC20VotesUpgradeable.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"balanceOfAt(address,uint256)\":{\"details\":\"Retrieves the balance of `account` at the time `snapshotId` was created.\"},\"checkpoints(address,uint32)\":{\"details\":\"Get the `pos`-th checkpoint for `account`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"delegate(address)\":{\"details\":\"Delegate votes from the sender to `delegatee`.\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Delegates votes from signer to `delegatee`\"},\"delegates(address)\":{\"details\":\"Get the address `account` is currently delegating to.\"},\"getPastTotalSupply(uint256)\":{\"details\":\"Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. It is but NOT the sum of all the delegated votes! Requirements: - `blockNumber` must have been already mined\"},\"getPastVotes(address,uint256)\":{\"details\":\"Retrieve the number of votes for `account` at the end of `blockNumber`. Requirements: - `blockNumber` must have been already mined\"},\"getVotes(address)\":{\"details\":\"Gets the current votes balance for `account`\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"numCheckpoints(address)\":{\"details\":\"Get number of checkpoints for `account`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"Parameters of initialization encoded\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"totalSupplyAt(uint256)\":{\"details\":\"Retrieves the total supply at the time `snapshotId` was created.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"setUp(bytes)\":{\"notice\":\"Initialize function, will be triggered when a new proxy is deployed\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/VotesToken.sol\":\"VotesToken\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 the end of a past block (`blockNumber`).\\n */\\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\\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 blockNumber) 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(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0xe8e2d2f70db1913260634f710cc057d669b06eccf4dca27e18b79c3bbb101da6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n }\\n _balances[to] += amount;\\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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x7c7ac0bc6c340a7f320524b9a4b4b079ee9da3c51258080d4bab237f329a427c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ArraysUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\\n * total supply at the time are recorded for later access.\\n *\\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\\n * In naive implementations it's possible to perform a \\\"double spend\\\" attack by reusing the same balance from different\\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\\n * used to create an efficient ERC20 forking mechanism.\\n *\\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\\n * and the account address.\\n *\\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\\n *\\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\\n * alternative consider {ERC20Votes}.\\n *\\n * ==== Gas Costs\\n *\\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\\n *\\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\\n * transfers will have normal cost until the next snapshot, and so on.\\n */\\n\\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\\n function __ERC20Snapshot_init() internal onlyInitializing {\\n }\\n\\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\\n }\\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\\n\\n using ArraysUpgradeable for uint256[];\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\\n // Snapshot struct, but that would impede usage of functions that work on an array.\\n struct Snapshots {\\n uint256[] ids;\\n uint256[] values;\\n }\\n\\n mapping(address => Snapshots) private _accountBalanceSnapshots;\\n Snapshots private _totalSupplySnapshots;\\n\\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\\n CountersUpgradeable.Counter private _currentSnapshotId;\\n\\n /**\\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\\n */\\n event Snapshot(uint256 id);\\n\\n /**\\n * @dev Creates a new snapshot and returns its snapshot id.\\n *\\n * Emits a {Snapshot} event that contains the same id.\\n *\\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\\n *\\n * [WARNING]\\n * ====\\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\\n * you must consider that it can potentially be used by attackers in two ways.\\n *\\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\\n * section above.\\n *\\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\\n * ====\\n */\\n function _snapshot() internal virtual returns (uint256) {\\n _currentSnapshotId.increment();\\n\\n uint256 currentId = _getCurrentSnapshotId();\\n emit Snapshot(currentId);\\n return currentId;\\n }\\n\\n /**\\n * @dev Get the current snapshotId\\n */\\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\\n return _currentSnapshotId.current();\\n }\\n\\n /**\\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\\n */\\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\\n\\n return snapshotted ? value : balanceOf(account);\\n }\\n\\n /**\\n * @dev Retrieves the total supply at the time `snapshotId` was created.\\n */\\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\\n\\n return snapshotted ? value : totalSupply();\\n }\\n\\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n if (from == address(0)) {\\n // mint\\n _updateAccountSnapshot(to);\\n _updateTotalSupplySnapshot();\\n } else if (to == address(0)) {\\n // burn\\n _updateAccountSnapshot(from);\\n _updateTotalSupplySnapshot();\\n } else {\\n // transfer\\n _updateAccountSnapshot(from);\\n _updateAccountSnapshot(to);\\n }\\n }\\n\\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\\n require(snapshotId > 0, \\\"ERC20Snapshot: id is 0\\\");\\n require(snapshotId <= _getCurrentSnapshotId(), \\\"ERC20Snapshot: nonexistent id\\\");\\n\\n // When a valid snapshot is queried, there are three possibilities:\\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\\n // to this id is the current one.\\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\\n // requested id, and its value is the one to return.\\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\\n // larger than the requested one.\\n //\\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\\n // exactly this.\\n\\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\\n\\n if (index == snapshots.ids.length) {\\n return (false, 0);\\n } else {\\n return (true, snapshots.values[index]);\\n }\\n }\\n\\n function _updateAccountSnapshot(address account) private {\\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\\n }\\n\\n function _updateTotalSupplySnapshot() private {\\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\\n }\\n\\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\\n uint256 currentId = _getCurrentSnapshotId();\\n if (_lastSnapshotId(snapshots.ids) < currentId) {\\n snapshots.ids.push(currentId);\\n snapshots.values.push(currentValue);\\n }\\n }\\n\\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\\n if (ids.length == 0) {\\n return 0;\\n } else {\\n return ids[ids.length - 1];\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0x42da8099f59958af496f6c8f0d9c1ce0a929151e02f877e4be23aca4cc440cbe\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/math/MathUpgradeable.sol\\\";\\nimport \\\"../../../governance/utils/IVotesUpgradeable.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, IVotesUpgradeable, ERC20PermitUpgradeable {\\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 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 return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\\n }\\n\\n /**\\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_checkpoints[account], blockNumber);\\n }\\n\\n /**\\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\\n * It is but NOT the sum of all the delegated votes!\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"ERC20Votes: block not yet mined\\\");\\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\\n }\\n\\n /**\\n * @dev Lookup a value in a list of (sorted) checkpoints.\\n */\\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\\n //\\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 `blockNumber`, we look in [low, mid)\\n // - If the middle checkpoint is before or equal to `blockNumber`, 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 `blockNumber`, we end up with an index that is\\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\\n // the same.\\n uint256 high = ckpts.length;\\n uint256 low = 0;\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (ckpts[mid].fromBlock > blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n return high == 0 ? 0 : ckpts[high - 1].votes;\\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 {DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) 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 {DelegateChanged} and {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(\\n address src,\\n address dst,\\n uint256 amount\\n ) 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 oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\\n newWeight = op(oldWeight, delta);\\n\\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\\n ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight);\\n } else {\\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)}));\\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 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\":\"0x440d61e36baa04fb3b2843f010fae4116f8e3b276f1f6629bd8327368e3743a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x605434219ebbe4653f703640f06969faa5a1d78f0bfef878e5ddbb1ca369ceeb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.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\":\"0x564385ebed633694decce3e13d687f3ac7e8eaef64f7a504bfb3f03ad210601f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xcc70d8e2281fb3ff69e8ab242500f10142cd0a7fa8dd9e45882be270d4d09024\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to array types.\\n */\\nlibrary ArraysUpgradeable {\\n /**\\n * @dev Searches a sorted `array` and returns the first index that contains\\n * a value greater or equal to `element`. If no such index exists (i.e. all\\n * values in the array are strictly less than `element`), the array length is\\n * returned. Time complexity O(log n).\\n *\\n * `array` is expected to be sorted in ascending order, and to contain no\\n * repeated elements.\\n */\\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\\n if (array.length == 0) {\\n return 0;\\n }\\n\\n uint256 low = 0;\\n uint256 high = array.length;\\n\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (array[mid] > element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\\n if (low > 0 && array[low - 1] == element) {\\n return low - 1;\\n } else {\\n return low;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7c78eb214065a464bc47849a116caf75cac46307e6dc80a789447dd0a13494d8\",\"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/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xea5339a7fff0ed42b45be56a88efdd0b2ddde9fa480dc99fef9a6a4c5b776863\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (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\\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 } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xbf5daf926894541a40a64b43c3746aa1940c5a1b3b8d14a06465eea72a9b90cc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xaf5a96100f421d61693605349511e43221d3c2e47d4b3efa87af2b936e2567fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. It 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 // 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)`.\\n // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.\\n // This gives `2**k < a <= 2**(k+1)` \\u2192 `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.\\n // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a\\n // good first aproximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1;\\n uint256 x = a;\\n if (x >> 128 > 0) {\\n x >>= 128;\\n result <<= 64;\\n }\\n if (x >> 64 > 0) {\\n x >>= 64;\\n result <<= 32;\\n }\\n if (x >> 32 > 0) {\\n x >>= 32;\\n result <<= 16;\\n }\\n if (x >> 16 > 0) {\\n x >>= 16;\\n result <<= 8;\\n }\\n if (x >> 8 > 0) {\\n x >>= 8;\\n result <<= 4;\\n }\\n if (x >> 4 > 0) {\\n x >>= 4;\\n result <<= 2;\\n }\\n if (x >> 2 > 0) {\\n result <<= 1;\\n }\\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 uint256 result = sqrt(a);\\n if (rounding == Rounding.Up && result * result < a) {\\n result += 1;\\n }\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x3b39e1a87bb94b9145d91007bbd2c964438e99a659b4accc6ec6df6a1c62589a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)\\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) {\\n require(value >= type(int248).min && value <= type(int248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return int248(value);\\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) {\\n require(value >= type(int240).min && value <= type(int240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return int240(value);\\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) {\\n require(value >= type(int232).min && value <= type(int232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return int232(value);\\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) {\\n require(value >= type(int224).min && value <= type(int224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return int224(value);\\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) {\\n require(value >= type(int216).min && value <= type(int216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return int216(value);\\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) {\\n require(value >= type(int208).min && value <= type(int208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return int208(value);\\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) {\\n require(value >= type(int200).min && value <= type(int200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return int200(value);\\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) {\\n require(value >= type(int192).min && value <= type(int192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return int192(value);\\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) {\\n require(value >= type(int184).min && value <= type(int184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return int184(value);\\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) {\\n require(value >= type(int176).min && value <= type(int176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return int176(value);\\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) {\\n require(value >= type(int168).min && value <= type(int168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return int168(value);\\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) {\\n require(value >= type(int160).min && value <= type(int160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return int160(value);\\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) {\\n require(value >= type(int152).min && value <= type(int152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return int152(value);\\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) {\\n require(value >= type(int144).min && value <= type(int144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return int144(value);\\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) {\\n require(value >= type(int136).min && value <= type(int136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return int136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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) {\\n require(value >= type(int120).min && value <= type(int120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return int120(value);\\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) {\\n require(value >= type(int112).min && value <= type(int112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return int112(value);\\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) {\\n require(value >= type(int104).min && value <= type(int104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return int104(value);\\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) {\\n require(value >= type(int96).min && value <= type(int96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return int96(value);\\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) {\\n require(value >= type(int88).min && value <= type(int88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return int88(value);\\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) {\\n require(value >= type(int80).min && value <= type(int80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return int80(value);\\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) {\\n require(value >= type(int72).min && value <= type(int72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return int72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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) {\\n require(value >= type(int56).min && value <= type(int56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return int56(value);\\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) {\\n require(value >= type(int48).min && value <= type(int48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return int48(value);\\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) {\\n require(value >= type(int40).min && value <= type(int40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return int40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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) {\\n require(value >= type(int24).min && value <= type(int24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return int24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _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\":\"0xd7ebe0f80affaa622b9efd95cc8db3e03e70d699176f7457b4a95e34a11f9834\",\"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/ERC165Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC165.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 ERC165Storage is ERC165 {\\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\",\"keccak256\":\"0x77bf0086774bab931413c3388d3a0f7d44cf6878965b72147f57bb0fbbf394bd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/VotesToken.sol\":{\"content\":\"//SPDX-License-Identifier: Unlicense\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165Storage.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\\\";\\r\\n\\r\\ncontract VotesToken is\\r\\n IERC20Upgradeable,\\r\\n ERC20SnapshotUpgradeable,\\r\\n ERC20VotesUpgradeable,\\r\\n ERC165Storage,\\r\\n FactoryFriendly\\r\\n{\\r\\n /// @notice Initialize function, will be triggered when a new proxy is deployed\\r\\n /// @param initializeParams Parameters of initialization encoded\\r\\n function setUp(bytes memory initializeParams) public override initializer {\\r\\n (\\r\\n string memory _name,\\r\\n string memory _symbol,\\r\\n address[] memory _hodlers,\\r\\n uint256[] memory _allocations // Address(0) == msg.sender\\r\\n ) = abi.decode(\\r\\n initializeParams,\\r\\n (string, string, address[], uint256[])\\r\\n );\\r\\n\\r\\n __ERC20_init(_name, _symbol);\\r\\n __ERC20Permit_init(_name);\\r\\n _registerInterface(type(IERC20Upgradeable).interfaceId);\\r\\n\\r\\n for (uint256 i = 0; i < _hodlers.length; i++) {\\r\\n _mint(_hodlers[i], _allocations[i]);\\r\\n }\\r\\n }\\r\\n\\r\\n function captureSnapShot() external returns (uint256 snapId) {\\r\\n snapId = _snapshot();\\r\\n }\\r\\n\\r\\n // The functions below are overrides required by Solidity.\\r\\n function _mint(address to, uint256 amount)\\r\\n internal\\r\\n virtual\\r\\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\\r\\n {\\r\\n super._mint(to, amount);\\r\\n }\\r\\n\\r\\n function _burn(address account, uint256 amount)\\r\\n internal\\r\\n virtual\\r\\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\\r\\n {\\r\\n super._burn(account, amount);\\r\\n }\\r\\n\\r\\n function _beforeTokenTransfer(\\r\\n address from,\\r\\n address to,\\r\\n uint256 amount\\r\\n ) internal virtual override(ERC20Upgradeable, ERC20SnapshotUpgradeable) {\\r\\n super._beforeTokenTransfer(from, to, amount);\\r\\n }\\r\\n\\r\\n function _afterTokenTransfer(\\r\\n address from,\\r\\n address to,\\r\\n uint256 amount\\r\\n ) internal virtual override(ERC20Upgradeable, ERC20VotesUpgradeable) {\\r\\n super._afterTokenTransfer(from, to, amount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x6ce98c8da806aa349e6c35d73cf9dc307ad1e4651754dae29cc1403b56cd42eb\",\"license\":\"Unlicense\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506128d5806100206000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80637ecebe0011610104578063a4f9edbf116100a2578063d505accf11610071578063d505accf14610410578063dd62ed3e14610423578063f1127ed814610436578063f2fde38b1461047357600080fd5b8063a4f9edbf146103cf578063a9059cbb146103e2578063c3cda520146103f5578063d1dc72a31461040857600080fd5b806395d89b41116100de57806395d89b411461038e578063981b24d0146103965780639ab24eb0146103a9578063a457c2d7146103bc57600080fd5b80637ecebe00146103565780638da5cb5b146103695780638e539e8c1461037b57600080fd5b8063395093511161017c5780635c19a95c1161014b5780635c19a95c146102e85780636fcfff45146102fd57806370a0823114610325578063715018a61461034e57600080fd5b8063395093511461026b5780633a46b1a81461027e5780634ee2cd7e14610291578063587cde1e146102a457600080fd5b806318160ddd116101b857806318160ddd1461022f57806323b872dd14610241578063313ce567146102545780633644e5151461026357600080fd5b806301ffc9a7146101df57806306fdde0314610207578063095ea7b31461021c575b600080fd5b6101f26101ed366004612222565b610486565b60405190151581526020015b60405180910390f35b61020f6104c7565b6040516101fe9190612278565b6101f261022a3660046122c0565b610559565b6035545b6040519081526020016101fe565b6101f261024f3660046122ec565b610571565b604051601281526020016101fe565b610233610595565b6101f26102793660046122c0565b6105a4565b61023361028c3660046122c0565b6105c6565b61023361029f3660046122c0565b610645565b6102d06102b236600461232d565b6001600160a01b03908116600090815260fe60205260409020541690565b6040516001600160a01b0390911681526020016101fe565b6102fb6102f636600461232d565b61069e565b005b61031061030b36600461232d565b6106ab565b60405163ffffffff90911681526020016101fe565b61023361033336600461232d565b6001600160a01b031660009081526033602052604090205490565b6102fb6106cd565b61023361036436600461232d565b6106e1565b610131546001600160a01b03166102d0565b61023361038936600461234a565b6106ff565b61020f61075c565b6102336103a436600461234a565b61076b565b6102336103b736600461232d565b610796565b6101f26103ca3660046122c0565b61081d565b6102fb6103dd3660046123d2565b610898565b6101f26103f03660046122c0565b610a46565b6102fb610403366004612463565b610a54565b610233610b8a565b6102fb61041e3660046124bd565b610b94565b61023361043136600461252b565b610cf8565b610449610444366004612564565b610d23565b60408051825163ffffffff1681526020928301516001600160e01b031692810192909252016101fe565b6102fb61048136600461232d565b610da7565b60006301ffc9a760e01b6001600160e01b0319831614806104c157506001600160e01b031982166000908152610130602052604090205460ff165b92915050565b6060603680546104d69061259b565b80601f01602080910402602001604051908101604052809291908181526020018280546105029061259b565b801561054f5780601f106105245761010080835404028352916020019161054f565b820191906000526020600020905b81548152906001019060200180831161053257829003601f168201915b5050505050905090565b600033610567818585610e1d565b5060019392505050565b60003361057f858285610f41565b61058a858585610fbb565b506001949350505050565b600061059f61119a565b905090565b6000336105678185856105b78383610cf8565b6105c191906125e5565b610e1d565b600043821061061c5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064015b60405180910390fd5b6001600160a01b038316600090815260ff6020526040902061063e9083611215565b9392505050565b6001600160a01b03821660009081526065602052604081208190819061066c9085906112d2565b9150915081610693576001600160a01b038516600090815260336020526040902054610695565b805b95945050505050565b6106a833826113c8565b50565b6001600160a01b038116600090815260ff60205260408120546104c190611442565b6106d56114ab565b6106df6000611506565b565b6001600160a01b038116600090815260cb60205260408120546104c1565b60004382106107505760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610613565b6104c161010083611215565b6060603780546104d69061259b565b600080600061077b8460666112d2565b915091508161078c5760355461078e565b805b949350505050565b6001600160a01b038116600090815260ff6020526040812054801561080a576001600160a01b038316600090815260ff602052604090206107d86001836125fd565b815481106107e8576107e8612614565b60009182526020909120015464010000000090046001600160e01b031661080d565b60005b6001600160e01b03169392505050565b6000338161082b8286610cf8565b90508381101561088b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610613565b61058a8286868403610e1d565b600054610100900460ff16158080156108b85750600054600160ff909116105b806108d25750303b1580156108d2575060005460ff166001145b6109355760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610613565b6000805460ff191660011790558015610958576000805461ff0019166101001790555b6000806000808580602001905181019061097291906126f9565b93509350935093506109848484611559565b61098d8461158a565b61099d6336372b0760e01b6115d4565b60005b82518110156109f7576109e58382815181106109be576109be612614565b60200260200101518383815181106109d8576109d8612614565b6020026020010151611654565b806109ef81612803565b9150506109a0565b50505050508015610a42576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b600033610567818585610fbb565b83421115610aa45760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610613565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090610b1e90610b169060a0016040516020818303038152906040528051906020012061165e565b8585856116ac565b9050610b29816116d4565b8614610b775760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610613565b610b8181886113c8565b50505050505050565b600061059f6116fc565b83421115610be45760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610613565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610c138c6116d4565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610c6e8261165e565b90506000610c7e828787876116ac565b9050896001600160a01b0316816001600160a01b031614610ce15760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610613565b610cec8a8a8a610e1d565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60408051808201909152600080825260208201526001600160a01b038316600090815260ff60205260409020805463ffffffff8416908110610d6757610d67612614565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610daf6114ab565b6001600160a01b038116610e145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610613565b6106a881611506565b6001600160a01b038316610e7f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610613565b6001600160a01b038216610ee05760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610613565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610f4d8484610cf8565b90506000198114610fb55781811015610fa85760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610613565b610fb58484848403610e1d565b50505050565b6001600160a01b03831661101f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610613565b6001600160a01b0382166110815760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610613565b61108c838383611756565b6001600160a01b038316600090815260336020526040902054818110156111045760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610613565b6001600160a01b0380851660009081526033602052604080822085850390559185168152908120805484929061113b9084906125e5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161118791815260200190565b60405180910390a3610fb5848484611766565b600061059f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6111c960975490565b6098546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b8154600090815b818110156112795760006112308284611771565b90508486828154811061124557611245612614565b60009182526020909120015463ffffffff16111561126557809250611273565b6112708160016125e5565b91505b5061121c565b81156112bd578461128b6001846125fd565b8154811061129b5761129b612614565b60009182526020909120015464010000000090046001600160e01b03166112c0565b60005b6001600160e01b031695945050505050565b6000806000841161131e5760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b6044820152606401610613565b61132661178c565b8411156113755760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610613565b60006113818486611797565b845490915081036113995760008092509250506113c1565b60018460010182815481106113b0576113b0612614565b906000526020600020015492509250505b9250929050565b6001600160a01b03828116600081815260fe6020818152604080842080546033845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610fb582848361185c565b600063ffffffff8211156114a75760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610613565b5090565b610131546001600160a01b031633146106df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610613565b61013180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166115805760405162461bcd60e51b81526004016106139061281c565b610a428282611999565b600054610100900460ff166115b15760405162461bcd60e51b81526004016106139061281c565b6106a881604051806040016040528060018152602001603160f81b8152506119e7565b6001600160e01b0319808216900361162e5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610613565b6001600160e01b031916600090815261013060205260409020805460ff19166001179055565b610a428282611a28565b60006104c161166b61119a565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006116bd87878787611ab3565b915091506116ca81611ba0565b5095945050505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b600061170c606880546001019055565b600061171661178c565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb678160405161174991815260200190565b60405180910390a1919050565b611761838383611d56565b505050565b611761838383611d9e565b60006117806002848418612867565b61063e908484166125e5565b600061059f60685490565b815460009081036117aa575060006104c1565b82546000905b808210156118065760006117c48383611771565b9050848682815481106117d9576117d9612614565b906000526020600020015411156117f257809150611800565b6117fd8160016125e5565b92505b506117b0565b60008211801561183b5750838561181e6001856125fd565b8154811061182e5761182e612614565b9060005260206000200154145b156118545761184b6001836125fd565b925050506104c1565b5090506104c1565b816001600160a01b0316836001600160a01b03161415801561187e5750600081115b15611761576001600160a01b0383161561190c576001600160a01b038316600090815260ff6020526040812081906118b990611dd085611ddc565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611901929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615611761576001600160a01b038216600090815260ff60205260408120819061194290611f5585611ddc565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161198a929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff166119c05760405162461bcd60e51b81526004016106139061281c565b81516119d3906036906020850190612192565b508051611761906037906020840190612192565b600054610100900460ff16611a0e5760405162461bcd60e51b81526004016106139061281c565b815160209283012081519190920120609791909155609855565b611a328282611f61565b6035546001600160e01b031015611aa45760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610613565b610fb5610100611f5583611ddc565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611aea5750600090506003611b97565b8460ff16601b14158015611b0257508460ff16601c14155b15611b135750600090506004611b97565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b67573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b9057600060019250925050611b97565b9150600090505b94509492505050565b6000816004811115611bb457611bb4612889565b03611bbc5750565b6001816004811115611bd057611bd0612889565b03611c1d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610613565b6002816004811115611c3157611c31612889565b03611c7e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610613565b6003816004811115611c9257611c92612889565b03611cea5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610613565b6004816004811115611cfe57611cfe612889565b036106a85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610613565b6001600160a01b038316611d7557611d6d82612054565b611761612087565b6001600160a01b038216611d8c57611d6d83612054565b611d9583612054565b61176182612054565b6001600160a01b03838116600090815260fe60205260408082205485841683529120546117619291821691168361185c565b600061063e82846125fd565b825460009081908015611e275785611df56001836125fd565b81548110611e0557611e05612614565b60009182526020909120015464010000000090046001600160e01b0316611e2a565b60005b6001600160e01b03169250611e4383858763ffffffff16565b9150600081118015611e8157504386611e5d6001846125fd565b81548110611e6d57611e6d612614565b60009182526020909120015463ffffffff16145b15611ee157611e8f82612095565b86611e9b6001846125fd565b81548110611eab57611eab612614565b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550611f4c565b856040518060400160405280611ef643611442565b63ffffffff168152602001611f0a85612095565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b600061063e82846125e5565b6001600160a01b038216611fb75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610613565b611fc360008383611756565b8060356000828254611fd591906125e5565b90915550506001600160a01b038216600090815260336020526040812080548392906120029084906125e5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a4260008383611766565b6001600160a01b03811660009081526065602090815260408083206033909252909120546106a891906120fe565b6120fe565b6106df606661208260355490565b60006001600160e01b038211156114a75760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610613565b600061210861178c565b90508061211484612148565b1015611761578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8054600090810361215b57506000919050565b8154829061216b906001906125fd565b8154811061217b5761217b612614565b90600052602060002001549050919050565b919050565b82805461219e9061259b565b90600052602060002090601f0160209004810192826121c05760008555612206565b82601f106121d957805160ff1916838001178555612206565b82800160010185558215612206579182015b828111156122065782518255916020019190600101906121eb565b506114a79291505b808211156114a7576000815560010161220e565b60006020828403121561223457600080fd5b81356001600160e01b03198116811461063e57600080fd5b60005b8381101561226757818101518382015260200161224f565b83811115610fb55750506000910152565b602081526000825180602084015261229781604085016020870161224c565b601f01601f19169190910160400192915050565b6001600160a01b03811681146106a857600080fd5b600080604083850312156122d357600080fd5b82356122de816122ab565b946020939093013593505050565b60008060006060848603121561230157600080fd5b833561230c816122ab565b9250602084013561231c816122ab565b929592945050506040919091013590565b60006020828403121561233f57600080fd5b813561063e816122ab565b60006020828403121561235c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156123a2576123a2612363565b604052919050565b600067ffffffffffffffff8211156123c4576123c4612363565b50601f01601f191660200190565b6000602082840312156123e457600080fd5b813567ffffffffffffffff8111156123fb57600080fd5b8201601f8101841361240c57600080fd5b803561241f61241a826123aa565b612379565b81815285602083850101111561243457600080fd5b81602084016020830137600091810160200191909152949350505050565b803560ff8116811461218d57600080fd5b60008060008060008060c0878903121561247c57600080fd5b8635612487816122ab565b955060208701359450604087013593506124a360608801612452565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a0312156124d857600080fd5b87356124e3816122ab565b965060208801356124f3816122ab565b9550604088013594506060880135935061250f60808901612452565b925060a0880135915060c0880135905092959891949750929550565b6000806040838503121561253e57600080fd5b8235612549816122ab565b91506020830135612559816122ab565b809150509250929050565b6000806040838503121561257757600080fd5b8235612582816122ab565b9150602083013563ffffffff8116811461255957600080fd5b600181811c908216806125af57607f821691505b6020821081036116f657634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156125f8576125f86125cf565b500190565b60008282101561260f5761260f6125cf565b500390565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261263b57600080fd5b815161264961241a826123aa565b81815284602083860101111561265e57600080fd5b61069382602083016020870161224c565b600067ffffffffffffffff82111561268957612689612363565b5060051b60200190565b600082601f8301126126a457600080fd5b815160206126b461241a8361266f565b82815260059290921b840181019181810190868411156126d357600080fd5b8286015b848110156126ee57805183529183019183016126d7565b509695505050505050565b6000806000806080858703121561270f57600080fd5b845167ffffffffffffffff8082111561272757600080fd5b6127338883890161262a565b955060209150818701518181111561274a57600080fd5b61275689828a0161262a565b95505060408701518181111561276b57600080fd5b8701601f8101891361277c57600080fd5b805161278a61241a8261266f565b81815260059190911b8201840190848101908b8311156127a957600080fd5b928501925b828410156127d05783516127c1816122ab565b825292850192908501906127ae565b60608b01519097509450505050808211156127ea57600080fd5b506127f787828801612693565b91505092959194509250565b600060018201612815576128156125cf565b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008261288457634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c7988cf3cdbaafa682a544ad3bec3ccde7d06dc8671977f04ba77648275dda5564736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80637ecebe0011610104578063a4f9edbf116100a2578063d505accf11610071578063d505accf14610410578063dd62ed3e14610423578063f1127ed814610436578063f2fde38b1461047357600080fd5b8063a4f9edbf146103cf578063a9059cbb146103e2578063c3cda520146103f5578063d1dc72a31461040857600080fd5b806395d89b41116100de57806395d89b411461038e578063981b24d0146103965780639ab24eb0146103a9578063a457c2d7146103bc57600080fd5b80637ecebe00146103565780638da5cb5b146103695780638e539e8c1461037b57600080fd5b8063395093511161017c5780635c19a95c1161014b5780635c19a95c146102e85780636fcfff45146102fd57806370a0823114610325578063715018a61461034e57600080fd5b8063395093511461026b5780633a46b1a81461027e5780634ee2cd7e14610291578063587cde1e146102a457600080fd5b806318160ddd116101b857806318160ddd1461022f57806323b872dd14610241578063313ce567146102545780633644e5151461026357600080fd5b806301ffc9a7146101df57806306fdde0314610207578063095ea7b31461021c575b600080fd5b6101f26101ed366004612222565b610486565b60405190151581526020015b60405180910390f35b61020f6104c7565b6040516101fe9190612278565b6101f261022a3660046122c0565b610559565b6035545b6040519081526020016101fe565b6101f261024f3660046122ec565b610571565b604051601281526020016101fe565b610233610595565b6101f26102793660046122c0565b6105a4565b61023361028c3660046122c0565b6105c6565b61023361029f3660046122c0565b610645565b6102d06102b236600461232d565b6001600160a01b03908116600090815260fe60205260409020541690565b6040516001600160a01b0390911681526020016101fe565b6102fb6102f636600461232d565b61069e565b005b61031061030b36600461232d565b6106ab565b60405163ffffffff90911681526020016101fe565b61023361033336600461232d565b6001600160a01b031660009081526033602052604090205490565b6102fb6106cd565b61023361036436600461232d565b6106e1565b610131546001600160a01b03166102d0565b61023361038936600461234a565b6106ff565b61020f61075c565b6102336103a436600461234a565b61076b565b6102336103b736600461232d565b610796565b6101f26103ca3660046122c0565b61081d565b6102fb6103dd3660046123d2565b610898565b6101f26103f03660046122c0565b610a46565b6102fb610403366004612463565b610a54565b610233610b8a565b6102fb61041e3660046124bd565b610b94565b61023361043136600461252b565b610cf8565b610449610444366004612564565b610d23565b60408051825163ffffffff1681526020928301516001600160e01b031692810192909252016101fe565b6102fb61048136600461232d565b610da7565b60006301ffc9a760e01b6001600160e01b0319831614806104c157506001600160e01b031982166000908152610130602052604090205460ff165b92915050565b6060603680546104d69061259b565b80601f01602080910402602001604051908101604052809291908181526020018280546105029061259b565b801561054f5780601f106105245761010080835404028352916020019161054f565b820191906000526020600020905b81548152906001019060200180831161053257829003601f168201915b5050505050905090565b600033610567818585610e1d565b5060019392505050565b60003361057f858285610f41565b61058a858585610fbb565b506001949350505050565b600061059f61119a565b905090565b6000336105678185856105b78383610cf8565b6105c191906125e5565b610e1d565b600043821061061c5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064015b60405180910390fd5b6001600160a01b038316600090815260ff6020526040902061063e9083611215565b9392505050565b6001600160a01b03821660009081526065602052604081208190819061066c9085906112d2565b9150915081610693576001600160a01b038516600090815260336020526040902054610695565b805b95945050505050565b6106a833826113c8565b50565b6001600160a01b038116600090815260ff60205260408120546104c190611442565b6106d56114ab565b6106df6000611506565b565b6001600160a01b038116600090815260cb60205260408120546104c1565b60004382106107505760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610613565b6104c161010083611215565b6060603780546104d69061259b565b600080600061077b8460666112d2565b915091508161078c5760355461078e565b805b949350505050565b6001600160a01b038116600090815260ff6020526040812054801561080a576001600160a01b038316600090815260ff602052604090206107d86001836125fd565b815481106107e8576107e8612614565b60009182526020909120015464010000000090046001600160e01b031661080d565b60005b6001600160e01b03169392505050565b6000338161082b8286610cf8565b90508381101561088b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610613565b61058a8286868403610e1d565b600054610100900460ff16158080156108b85750600054600160ff909116105b806108d25750303b1580156108d2575060005460ff166001145b6109355760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610613565b6000805460ff191660011790558015610958576000805461ff0019166101001790555b6000806000808580602001905181019061097291906126f9565b93509350935093506109848484611559565b61098d8461158a565b61099d6336372b0760e01b6115d4565b60005b82518110156109f7576109e58382815181106109be576109be612614565b60200260200101518383815181106109d8576109d8612614565b6020026020010151611654565b806109ef81612803565b9150506109a0565b50505050508015610a42576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b600033610567818585610fbb565b83421115610aa45760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610613565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090610b1e90610b169060a0016040516020818303038152906040528051906020012061165e565b8585856116ac565b9050610b29816116d4565b8614610b775760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610613565b610b8181886113c8565b50505050505050565b600061059f6116fc565b83421115610be45760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610613565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610c138c6116d4565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610c6e8261165e565b90506000610c7e828787876116ac565b9050896001600160a01b0316816001600160a01b031614610ce15760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610613565b610cec8a8a8a610e1d565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60408051808201909152600080825260208201526001600160a01b038316600090815260ff60205260409020805463ffffffff8416908110610d6757610d67612614565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610daf6114ab565b6001600160a01b038116610e145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610613565b6106a881611506565b6001600160a01b038316610e7f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610613565b6001600160a01b038216610ee05760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610613565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610f4d8484610cf8565b90506000198114610fb55781811015610fa85760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610613565b610fb58484848403610e1d565b50505050565b6001600160a01b03831661101f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610613565b6001600160a01b0382166110815760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610613565b61108c838383611756565b6001600160a01b038316600090815260336020526040902054818110156111045760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610613565b6001600160a01b0380851660009081526033602052604080822085850390559185168152908120805484929061113b9084906125e5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161118791815260200190565b60405180910390a3610fb5848484611766565b600061059f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6111c960975490565b6098546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b8154600090815b818110156112795760006112308284611771565b90508486828154811061124557611245612614565b60009182526020909120015463ffffffff16111561126557809250611273565b6112708160016125e5565b91505b5061121c565b81156112bd578461128b6001846125fd565b8154811061129b5761129b612614565b60009182526020909120015464010000000090046001600160e01b03166112c0565b60005b6001600160e01b031695945050505050565b6000806000841161131e5760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b6044820152606401610613565b61132661178c565b8411156113755760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610613565b60006113818486611797565b845490915081036113995760008092509250506113c1565b60018460010182815481106113b0576113b0612614565b906000526020600020015492509250505b9250929050565b6001600160a01b03828116600081815260fe6020818152604080842080546033845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610fb582848361185c565b600063ffffffff8211156114a75760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610613565b5090565b610131546001600160a01b031633146106df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610613565b61013180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166115805760405162461bcd60e51b81526004016106139061281c565b610a428282611999565b600054610100900460ff166115b15760405162461bcd60e51b81526004016106139061281c565b6106a881604051806040016040528060018152602001603160f81b8152506119e7565b6001600160e01b0319808216900361162e5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610613565b6001600160e01b031916600090815261013060205260409020805460ff19166001179055565b610a428282611a28565b60006104c161166b61119a565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006116bd87878787611ab3565b915091506116ca81611ba0565b5095945050505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b600061170c606880546001019055565b600061171661178c565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb678160405161174991815260200190565b60405180910390a1919050565b611761838383611d56565b505050565b611761838383611d9e565b60006117806002848418612867565b61063e908484166125e5565b600061059f60685490565b815460009081036117aa575060006104c1565b82546000905b808210156118065760006117c48383611771565b9050848682815481106117d9576117d9612614565b906000526020600020015411156117f257809150611800565b6117fd8160016125e5565b92505b506117b0565b60008211801561183b5750838561181e6001856125fd565b8154811061182e5761182e612614565b9060005260206000200154145b156118545761184b6001836125fd565b925050506104c1565b5090506104c1565b816001600160a01b0316836001600160a01b03161415801561187e5750600081115b15611761576001600160a01b0383161561190c576001600160a01b038316600090815260ff6020526040812081906118b990611dd085611ddc565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611901929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615611761576001600160a01b038216600090815260ff60205260408120819061194290611f5585611ddc565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161198a929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff166119c05760405162461bcd60e51b81526004016106139061281c565b81516119d3906036906020850190612192565b508051611761906037906020840190612192565b600054610100900460ff16611a0e5760405162461bcd60e51b81526004016106139061281c565b815160209283012081519190920120609791909155609855565b611a328282611f61565b6035546001600160e01b031015611aa45760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610613565b610fb5610100611f5583611ddc565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611aea5750600090506003611b97565b8460ff16601b14158015611b0257508460ff16601c14155b15611b135750600090506004611b97565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b67573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b9057600060019250925050611b97565b9150600090505b94509492505050565b6000816004811115611bb457611bb4612889565b03611bbc5750565b6001816004811115611bd057611bd0612889565b03611c1d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610613565b6002816004811115611c3157611c31612889565b03611c7e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610613565b6003816004811115611c9257611c92612889565b03611cea5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610613565b6004816004811115611cfe57611cfe612889565b036106a85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610613565b6001600160a01b038316611d7557611d6d82612054565b611761612087565b6001600160a01b038216611d8c57611d6d83612054565b611d9583612054565b61176182612054565b6001600160a01b03838116600090815260fe60205260408082205485841683529120546117619291821691168361185c565b600061063e82846125fd565b825460009081908015611e275785611df56001836125fd565b81548110611e0557611e05612614565b60009182526020909120015464010000000090046001600160e01b0316611e2a565b60005b6001600160e01b03169250611e4383858763ffffffff16565b9150600081118015611e8157504386611e5d6001846125fd565b81548110611e6d57611e6d612614565b60009182526020909120015463ffffffff16145b15611ee157611e8f82612095565b86611e9b6001846125fd565b81548110611eab57611eab612614565b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550611f4c565b856040518060400160405280611ef643611442565b63ffffffff168152602001611f0a85612095565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b600061063e82846125e5565b6001600160a01b038216611fb75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610613565b611fc360008383611756565b8060356000828254611fd591906125e5565b90915550506001600160a01b038216600090815260336020526040812080548392906120029084906125e5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610a4260008383611766565b6001600160a01b03811660009081526065602090815260408083206033909252909120546106a891906120fe565b6120fe565b6106df606661208260355490565b60006001600160e01b038211156114a75760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610613565b600061210861178c565b90508061211484612148565b1015611761578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8054600090810361215b57506000919050565b8154829061216b906001906125fd565b8154811061217b5761217b612614565b90600052602060002001549050919050565b919050565b82805461219e9061259b565b90600052602060002090601f0160209004810192826121c05760008555612206565b82601f106121d957805160ff1916838001178555612206565b82800160010185558215612206579182015b828111156122065782518255916020019190600101906121eb565b506114a79291505b808211156114a7576000815560010161220e565b60006020828403121561223457600080fd5b81356001600160e01b03198116811461063e57600080fd5b60005b8381101561226757818101518382015260200161224f565b83811115610fb55750506000910152565b602081526000825180602084015261229781604085016020870161224c565b601f01601f19169190910160400192915050565b6001600160a01b03811681146106a857600080fd5b600080604083850312156122d357600080fd5b82356122de816122ab565b946020939093013593505050565b60008060006060848603121561230157600080fd5b833561230c816122ab565b9250602084013561231c816122ab565b929592945050506040919091013590565b60006020828403121561233f57600080fd5b813561063e816122ab565b60006020828403121561235c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156123a2576123a2612363565b604052919050565b600067ffffffffffffffff8211156123c4576123c4612363565b50601f01601f191660200190565b6000602082840312156123e457600080fd5b813567ffffffffffffffff8111156123fb57600080fd5b8201601f8101841361240c57600080fd5b803561241f61241a826123aa565b612379565b81815285602083850101111561243457600080fd5b81602084016020830137600091810160200191909152949350505050565b803560ff8116811461218d57600080fd5b60008060008060008060c0878903121561247c57600080fd5b8635612487816122ab565b955060208701359450604087013593506124a360608801612452565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a0312156124d857600080fd5b87356124e3816122ab565b965060208801356124f3816122ab565b9550604088013594506060880135935061250f60808901612452565b925060a0880135915060c0880135905092959891949750929550565b6000806040838503121561253e57600080fd5b8235612549816122ab565b91506020830135612559816122ab565b809150509250929050565b6000806040838503121561257757600080fd5b8235612582816122ab565b9150602083013563ffffffff8116811461255957600080fd5b600181811c908216806125af57607f821691505b6020821081036116f657634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156125f8576125f86125cf565b500190565b60008282101561260f5761260f6125cf565b500390565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261263b57600080fd5b815161264961241a826123aa565b81815284602083860101111561265e57600080fd5b61069382602083016020870161224c565b600067ffffffffffffffff82111561268957612689612363565b5060051b60200190565b600082601f8301126126a457600080fd5b815160206126b461241a8361266f565b82815260059290921b840181019181810190868411156126d357600080fd5b8286015b848110156126ee57805183529183019183016126d7565b509695505050505050565b6000806000806080858703121561270f57600080fd5b845167ffffffffffffffff8082111561272757600080fd5b6127338883890161262a565b955060209150818701518181111561274a57600080fd5b61275689828a0161262a565b95505060408701518181111561276b57600080fd5b8701601f8101891361277c57600080fd5b805161278a61241a8261266f565b81815260059190911b8201840190848101908b8311156127a957600080fd5b928501925b828410156127d05783516127c1816122ab565b825292850192908501906127ae565b60608b01519097509450505050808211156127ea57600080fd5b506127f787828801612693565b91505092959194509250565b600060018201612815576128156125cf565b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008261288457634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c7988cf3cdbaafa682a544ad3bec3ccde7d06dc8671977f04ba77648275dda5564736f6c634300080d0033", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "balanceOfAt(address,uint256)": { + "details": "Retrieves the balance of `account` at the time `snapshotId` was created." + }, + "checkpoints(address,uint32)": { + "details": "Get the `pos`-th checkpoint for `account`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "delegate(address)": { + "details": "Delegate votes from the sender to `delegatee`." + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "Delegates votes from signer to `delegatee`" + }, + "delegates(address)": { + "details": "Get the address `account` is currently delegating to." + }, + "getPastTotalSupply(uint256)": { + "details": "Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. It is but NOT the sum of all the delegated votes! Requirements: - `blockNumber` must have been already mined" + }, + "getPastVotes(address,uint256)": { + "details": "Retrieve the number of votes for `account` at the end of `blockNumber`. Requirements: - `blockNumber` must have been already mined" + }, + "getVotes(address)": { + "details": "Gets the current votes balance for `account`" + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "numCheckpoints(address)": { + "details": "Get number of checkpoints for `account`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setUp(bytes)": { + "params": { + "initializeParams": "Parameters of initialization encoded" + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "totalSupplyAt(uint256)": { + "details": "Retrieves the total supply at the time `snapshotId` was created." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "setUp(bytes)": { + "notice": "Initialize function, will be triggered when a new proxy is deployed" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3006, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 3009, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 5465, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3169, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 3175, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 3177, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 3179, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 3181, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 3760, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 3882, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_accountBalanceSnapshots", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_address,t_struct(Snapshots)3877_storage)" + }, + { + "astId": 3885, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_totalSupplySnapshots", + "offset": 0, + "slot": "102", + "type": "t_struct(Snapshots)3877_storage" + }, + { + "astId": 3888, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_currentSnapshotId", + "offset": 0, + "slot": "104", + "type": "t_struct(Counter)5472_storage" + }, + { + "astId": 4186, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "__gap", + "offset": 0, + "slot": "105", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 6163, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "151", + "type": "t_bytes32" + }, + { + "astId": 6165, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "152", + "type": "t_bytes32" + }, + { + "astId": 6303, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4895, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_nonces", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(Counter)5472_storage)" + }, + { + "astId": 4903, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "204", + "type": "t_bytes32" + }, + { + "astId": 5059, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4228, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_delegates", + "offset": 0, + "slot": "254", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 4234, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_checkpoints", + "offset": 0, + "slot": "255", + "type": "t_mapping(t_address,t_array(t_struct(Checkpoint)4219_storage)dyn_storage)" + }, + { + "astId": 4238, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_totalSupplyCheckpoints", + "offset": 0, + "slot": "256", + "type": "t_array(t_struct(Checkpoint)4219_storage)dyn_storage" + }, + { + "astId": 4843, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "__gap", + "offset": 0, + "slot": "257", + "type": "t_array(t_uint256)47_storage" + }, + { + "astId": 9462, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_supportedInterfaces", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_bytes4,t_bool)" + }, + { + "astId": 2800, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_owner", + "offset": 0, + "slot": "305", + "type": "t_address" + }, + { + "astId": 2920, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "__gap", + "offset": 0, + "slot": "306", + "type": "t_array(t_uint256)49_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Checkpoint)4219_storage)dyn_storage": { + "base": "t_struct(Checkpoint)4219_storage", + "encoding": "dynamic_array", + "label": "struct ERC20VotesUpgradeable.Checkpoint[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)47_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[47]", + "numberOfBytes": "1504" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "encoding": "inplace", + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_array(t_struct(Checkpoint)4219_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC20VotesUpgradeable.Checkpoint[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(Checkpoint)4219_storage)dyn_storage" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)5472_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)5472_storage" + }, + "t_mapping(t_address,t_struct(Snapshots)3877_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC20SnapshotUpgradeable.Snapshots)", + "numberOfBytes": "32", + "value": "t_struct(Snapshots)3877_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes4,t_bool)": { + "encoding": "mapping", + "key": "t_bytes4", + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Checkpoint)4219_storage": { + "encoding": "inplace", + "label": "struct ERC20VotesUpgradeable.Checkpoint", + "members": [ + { + "astId": 4216, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "fromBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 4218, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "votes", + "offset": 4, + "slot": "0", + "type": "t_uint224" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Counter)5472_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 5471, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Snapshots)3877_storage": { + "encoding": "inplace", + "label": "struct ERC20SnapshotUpgradeable.Snapshots", + "members": [ + { + "astId": 3873, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "ids", + "offset": 0, + "slot": "0", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 3876, + "contract": "contracts/VotesToken.sol:VotesToken", + "label": "values", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)dyn_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint224": { + "encoding": "inplace", + "label": "uint224", + "numberOfBytes": "28" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/goerli/solcInputs/45f7710f616c39a15b2c4779b7f6d0c2.json b/deployments/goerli/solcInputs/45f7710f616c39a15b2c4779b7f6d0c2.json deleted file mode 100644 index b595b051..00000000 --- a/deployments/goerli/solcInputs/45f7710f616c39a15b2c4779b7f6d0c2.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/ClaimFactory.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/IClaimFactory.sol\";\r\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\r\nimport \"@openzeppelin/contracts/utils/Create2.sol\";\r\n\r\n/// @notice Token Factory used to deploy votes tokens\r\ncontract ClaimFactory is IClaimFactory {\r\n /// @dev Creates an ERC-20 votes token\r\n /// @param creator The address creating the module\r\n /// @param data The array of bytes used to create the token\r\n /// @return address The address of the created token\r\n function create(address creator, bytes[] calldata data)\r\n external\r\n override\r\n returns (address[] memory)\r\n {\r\n address[] memory createdContracts = new address[](1);\r\n\r\n createdContracts[0] = _createClaimSubsidiary(\r\n abi.decode(data[0], (address)),\r\n creator,\r\n abi.decode(data[1], (bytes32))\r\n );\r\n\r\n return createdContracts;\r\n }\r\n\r\n function _createClaimSubsidiary(\r\n address subImpl,\r\n address creator,\r\n bytes32 salt\r\n ) internal returns (address createdSubsidiary) {\r\n createdSubsidiary = Create2.deploy(\r\n 0,\r\n keccak256(\r\n abi.encodePacked(creator, msg.sender, block.chainid, salt)\r\n ),\r\n abi.encodePacked(\r\n type(ERC1967Proxy).creationCode,\r\n abi.encode(subImpl, \"\")\r\n )\r\n );\r\n emit SubsidiaryCreated(createdSubsidiary);\r\n }\r\n}\r\n" - }, - "contracts/interfaces/IClaimFactory.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\ninterface IClaimFactory {\r\n event SubsidiaryCreated(address indexed subsidiaryAddress);\r\n\r\n /// @dev Creates a module\r\n /// @param creator The address creating the module\r\n /// @param data The array of bytes used to create the module\r\n /// @return address[] Array of the created module addresses\r\n function create(address creator, bytes[] calldata data) external returns (address[] memory);\r\n}" - }, - "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Create2.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Create2.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(\n uint256 amount,\n bytes32 salt,\n bytes memory bytecode\n ) internal returns (address) {\n address addr;\n require(address(this).balance >= amount, \"Create2: insufficient balance\");\n require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n /// @solidity memory-safe-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), \"Create2: Failed on deploy\");\n return addr;\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n */\n function computeAddress(\n bytes32 salt,\n bytes32 bytecodeHash,\n address deployer\n ) internal pure returns (address) {\n bytes32 _data = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash));\n return address(uint160(uint256(_data)));\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" - }, - "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @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}\n" - }, - "@openzeppelin/contracts/utils/StorageSlot.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" - }, - "contracts/TokenFactory.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/ITokenFactory.sol\";\r\nimport \"./VotesToken.sol\";\r\nimport \"@openzeppelin/contracts/utils/Create2.sol\";\r\n\r\n/// @notice Token Factory used to deploy votes tokens\r\ncontract TokenFactory is ITokenFactory {\r\n /// @dev Creates an ERC-20 votes token\r\n /// @param creator The address creating the module\r\n /// @param data The array of bytes used to create the token\r\n /// @return address The address of the created token\r\n function create(address creator, bytes[] calldata data)\r\n external\r\n override\r\n returns (address[] memory)\r\n {\r\n address[] memory createdContracts = new address[](1);\r\n\r\n createdContracts[0] = _createToken(\r\n creator,\r\n abi.decode(data[4], (bytes32)),\r\n abi.decode(data[0], (string)),\r\n abi.decode(data[1], (string)),\r\n abi.decode(data[2], (address[])),\r\n abi.decode(data[3], (uint256[]))\r\n );\r\n\r\n return createdContracts;\r\n }\r\n\r\n function _createToken(\r\n address creator,\r\n bytes32 salt,\r\n string memory name,\r\n string memory symbol,\r\n address[] memory _hodlers,\r\n uint256[] memory _allocations\r\n ) internal returns (address createdToken) {\r\n createdToken = Create2.deploy(\r\n 0,\r\n keccak256(\r\n abi.encodePacked(creator, msg.sender, block.chainid, salt)\r\n ),\r\n abi.encodePacked(\r\n type(VotesToken).creationCode,\r\n abi.encode(name, symbol, _hodlers, _allocations)\r\n )\r\n );\r\n emit TokenCreated(createdToken);\r\n return createdToken;\r\n }\r\n}\r\n" - }, - "contracts/interfaces/ITokenFactory.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\ninterface ITokenFactory {\r\n event TokenCreated(address indexed tokenAddress);\r\n\r\n /// @dev Creates a module\r\n /// @param creator The address creating the module\r\n /// @param data The array of bytes used to create the module\r\n /// @return address[] Array of the created module addresses\r\n function create(address creator, bytes[] calldata data) external returns (address[] memory);\r\n}" - }, - "contracts/VotesToken.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/utils/introspection/ERC165Storage.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol\";\r\n\r\ncontract VotesToken is IERC20, ERC20Snapshot, ERC20Votes, ERC165Storage {\r\n constructor(\r\n string memory _name,\r\n string memory _symbol,\r\n address[] memory _hodlers,\r\n uint256[] memory _allocations\r\n ) ERC20(_name, _symbol) ERC20Permit(_name) {\r\n _registerInterface(type(IERC20).interfaceId);\r\n for (uint256 i = 0; i < _hodlers.length; i++) {\r\n _mint(_hodlers[i], _allocations[i]);\r\n }\r\n\r\n }\r\n\r\n function captureSnapShot() external returns (uint256 snapId) {\r\n snapId = _snapshot();\r\n }\r\n\r\n // The functions below are overrides required by Solidity.\r\n function _mint(address to, uint256 amount)\r\n internal\r\n virtual\r\n override(ERC20, ERC20Votes)\r\n {\r\n super._mint(to, amount);\r\n }\r\n\r\n function _burn(address account, uint256 amount)\r\n internal\r\n virtual\r\n override(ERC20, ERC20Votes)\r\n {\r\n super._burn(account, amount);\r\n }\r\n\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual override(ERC20, ERC20Snapshot) {\r\n super._beforeTokenTransfer(from, to, amount);\r\n }\r\n\r\n function _afterTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual override(ERC20, ERC20Votes) {\r\n super._afterTokenTransfer(from, to, amount);\r\n }\r\n}\r\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" - }, - "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC165.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 ERC165Storage is ERC165 {\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" - }, - "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-ERC20Permit.sol\";\nimport \"../../../utils/math/Math.sol\";\nimport \"../../../governance/utils/IVotes.sol\";\nimport \"../../../utils/math/SafeCast.sol\";\nimport \"../../../utils/cryptography/ECDSA.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 ERC20Votes is IVotes, ERC20Permit {\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 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 SafeCast.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 return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\n }\n\n /**\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\n require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n return _checkpointsLookup(_checkpoints[account], blockNumber);\n }\n\n /**\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\n * It is but NOT the sum of all the delegated votes!\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {\n require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\n }\n\n /**\n * @dev Lookup a value in a list of (sorted) checkpoints.\n */\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\n //\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 `blockNumber`, we look in [low, mid)\n // - If the middle checkpoint is before or equal to `blockNumber`, 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 `blockNumber`, we end up with an index that is\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\n // the same.\n uint256 high = ckpts.length;\n uint256 low = 0;\n while (low < high) {\n uint256 mid = Math.average(low, high);\n if (ckpts[mid].fromBlock > blockNumber) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n return high == 0 ? 0 : ckpts[high - 1].votes;\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 = ECDSA.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 {DelegateVotesChanged} event.\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) 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 {DelegateChanged} and {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(\n address src,\n address dst,\n uint256 amount\n ) 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 oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\n newWeight = op(oldWeight, delta);\n\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\n ckpts[pos - 1].votes = SafeCast.toUint224(newWeight);\n } else {\n ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(block.number), votes: SafeCast.toUint224(newWeight)}));\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" - }, - "@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../utils/Arrays.sol\";\nimport \"../../../utils/Counters.sol\";\n\n/**\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\n * total supply at the time are recorded for later access.\n *\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\n * In naive implementations it's possible to perform a \"double spend\" attack by reusing the same balance from different\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\n * used to create an efficient ERC20 forking mechanism.\n *\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\n * and the account address.\n *\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\n *\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\n * alternative consider {ERC20Votes}.\n *\n * ==== Gas Costs\n *\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\n *\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\n * transfers will have normal cost until the next snapshot, and so on.\n */\n\nabstract contract ERC20Snapshot is ERC20 {\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\n\n using Arrays for uint256[];\n using Counters for Counters.Counter;\n\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\n // Snapshot struct, but that would impede usage of functions that work on an array.\n struct Snapshots {\n uint256[] ids;\n uint256[] values;\n }\n\n mapping(address => Snapshots) private _accountBalanceSnapshots;\n Snapshots private _totalSupplySnapshots;\n\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\n Counters.Counter private _currentSnapshotId;\n\n /**\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\n */\n event Snapshot(uint256 id);\n\n /**\n * @dev Creates a new snapshot and returns its snapshot id.\n *\n * Emits a {Snapshot} event that contains the same id.\n *\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\n *\n * [WARNING]\n * ====\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\n * you must consider that it can potentially be used by attackers in two ways.\n *\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\n * section above.\n *\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\n * ====\n */\n function _snapshot() internal virtual returns (uint256) {\n _currentSnapshotId.increment();\n\n uint256 currentId = _getCurrentSnapshotId();\n emit Snapshot(currentId);\n return currentId;\n }\n\n /**\n * @dev Get the current snapshotId\n */\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\n return _currentSnapshotId.current();\n }\n\n /**\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\n */\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\n\n return snapshotted ? value : balanceOf(account);\n }\n\n /**\n * @dev Retrieves the total supply at the time `snapshotId` was created.\n */\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\n\n return snapshotted ? value : totalSupply();\n }\n\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n if (from == address(0)) {\n // mint\n _updateAccountSnapshot(to);\n _updateTotalSupplySnapshot();\n } else if (to == address(0)) {\n // burn\n _updateAccountSnapshot(from);\n _updateTotalSupplySnapshot();\n } else {\n // transfer\n _updateAccountSnapshot(from);\n _updateAccountSnapshot(to);\n }\n }\n\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\n require(snapshotId > 0, \"ERC20Snapshot: id is 0\");\n require(snapshotId <= _getCurrentSnapshotId(), \"ERC20Snapshot: nonexistent id\");\n\n // When a valid snapshot is queried, there are three possibilities:\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\n // to this id is the current one.\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\n // requested id, and its value is the one to return.\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\n // larger than the requested one.\n //\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\n // exactly this.\n\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\n\n if (index == snapshots.ids.length) {\n return (false, 0);\n } else {\n return (true, snapshots.values[index]);\n }\n }\n\n function _updateAccountSnapshot(address account) private {\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\n }\n\n function _updateTotalSupplySnapshot() private {\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\n }\n\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\n uint256 currentId = _getCurrentSnapshotId();\n if (_lastSnapshotId(snapshots.ids) < currentId) {\n snapshots.ids.push(currentId);\n snapshots.values.push(currentValue);\n }\n }\n\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\n if (ids.length == 0) {\n return 0;\n } else {\n return ids[ids.length - 1];\n }\n }\n}\n" - }, - "@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" - }, - "@openzeppelin/contracts/utils/introspection/IERC165.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20Permit.sol\";\nimport \"../ERC20.sol\";\nimport \"../../../utils/cryptography/draft-EIP712.sol\";\nimport \"../../../utils/cryptography/ECDSA.sol\";\nimport \"../../../utils/Counters.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 */\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n using Counters for Counters.Counter;\n\n mapping(address => Counters.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 constructor(string memory name) EIP712(name, \"1\") {}\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 = ECDSA.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 Counters.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n}\n" - }, - "@openzeppelin/contracts/utils/math/Math.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. It 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 // 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)`.\n // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.\n // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.\n // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a\n // good first aproximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1;\n uint256 x = a;\n if (x >> 128 > 0) {\n x >>= 128;\n result <<= 64;\n }\n if (x >> 64 > 0) {\n x >>= 64;\n result <<= 32;\n }\n if (x >> 32 > 0) {\n x >>= 32;\n result <<= 16;\n }\n if (x >> 16 > 0) {\n x >>= 16;\n result <<= 8;\n }\n if (x >> 8 > 0) {\n x >>= 8;\n result <<= 4;\n }\n if (x >> 4 > 0) {\n x >>= 4;\n result <<= 2;\n }\n if (x >> 2 > 0) {\n result <<= 1;\n }\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 uint256 result = sqrt(a);\n if (rounding == Rounding.Up && result * result < a) {\n result += 1;\n }\n return result;\n }\n}\n" - }, - "@openzeppelin/contracts/governance/utils/IVotes.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.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 IVotes {\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 the end of a past block (`blockNumber`).\n */\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\n\n /**\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\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 blockNumber) 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(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n" - }, - "@openzeppelin/contracts/utils/math/SafeCast.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted 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) {\n require(value >= type(int248).min && value <= type(int248).max, \"SafeCast: value doesn't fit in 248 bits\");\n return int248(value);\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) {\n require(value >= type(int240).min && value <= type(int240).max, \"SafeCast: value doesn't fit in 240 bits\");\n return int240(value);\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) {\n require(value >= type(int232).min && value <= type(int232).max, \"SafeCast: value doesn't fit in 232 bits\");\n return int232(value);\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) {\n require(value >= type(int224).min && value <= type(int224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return int224(value);\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) {\n require(value >= type(int216).min && value <= type(int216).max, \"SafeCast: value doesn't fit in 216 bits\");\n return int216(value);\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) {\n require(value >= type(int208).min && value <= type(int208).max, \"SafeCast: value doesn't fit in 208 bits\");\n return int208(value);\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) {\n require(value >= type(int200).min && value <= type(int200).max, \"SafeCast: value doesn't fit in 200 bits\");\n return int200(value);\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) {\n require(value >= type(int192).min && value <= type(int192).max, \"SafeCast: value doesn't fit in 192 bits\");\n return int192(value);\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) {\n require(value >= type(int184).min && value <= type(int184).max, \"SafeCast: value doesn't fit in 184 bits\");\n return int184(value);\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) {\n require(value >= type(int176).min && value <= type(int176).max, \"SafeCast: value doesn't fit in 176 bits\");\n return int176(value);\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) {\n require(value >= type(int168).min && value <= type(int168).max, \"SafeCast: value doesn't fit in 168 bits\");\n return int168(value);\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) {\n require(value >= type(int160).min && value <= type(int160).max, \"SafeCast: value doesn't fit in 160 bits\");\n return int160(value);\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) {\n require(value >= type(int152).min && value <= type(int152).max, \"SafeCast: value doesn't fit in 152 bits\");\n return int152(value);\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) {\n require(value >= type(int144).min && value <= type(int144).max, \"SafeCast: value doesn't fit in 144 bits\");\n return int144(value);\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) {\n require(value >= type(int136).min && value <= type(int136).max, \"SafeCast: value doesn't fit in 136 bits\");\n return int136(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= type(int128).min && value <= type(int128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\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) {\n require(value >= type(int120).min && value <= type(int120).max, \"SafeCast: value doesn't fit in 120 bits\");\n return int120(value);\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) {\n require(value >= type(int112).min && value <= type(int112).max, \"SafeCast: value doesn't fit in 112 bits\");\n return int112(value);\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) {\n require(value >= type(int104).min && value <= type(int104).max, \"SafeCast: value doesn't fit in 104 bits\");\n return int104(value);\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) {\n require(value >= type(int96).min && value <= type(int96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return int96(value);\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) {\n require(value >= type(int88).min && value <= type(int88).max, \"SafeCast: value doesn't fit in 88 bits\");\n return int88(value);\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) {\n require(value >= type(int80).min && value <= type(int80).max, \"SafeCast: value doesn't fit in 80 bits\");\n return int80(value);\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) {\n require(value >= type(int72).min && value <= type(int72).max, \"SafeCast: value doesn't fit in 72 bits\");\n return int72(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= type(int64).min && value <= type(int64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\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) {\n require(value >= type(int56).min && value <= type(int56).max, \"SafeCast: value doesn't fit in 56 bits\");\n return int56(value);\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) {\n require(value >= type(int48).min && value <= type(int48).max, \"SafeCast: value doesn't fit in 48 bits\");\n return int48(value);\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) {\n require(value >= type(int40).min && value <= type(int40).max, \"SafeCast: value doesn't fit in 40 bits\");\n return int40(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= type(int32).min && value <= type(int32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\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) {\n require(value >= type(int24).min && value <= type(int24).max, \"SafeCast: value doesn't fit in 24 bits\");\n return int24(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= type(int16).min && value <= type(int16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= type(int8).min && value <= type(int8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n *\n * _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" - }, - "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.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 ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\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 } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n }\n _balances[to] += amount;\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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n uint256 private immutable _CACHED_CHAIN_ID;\n address private immutable _CACHED_THIS;\n\n bytes32 private immutable _HASHED_NAME;\n bytes32 private immutable _HASHED_VERSION;\n bytes32 private immutable _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _CACHED_THIS = address(this);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Counters.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 Counters {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" - }, - "@openzeppelin/contracts/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Strings.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Arrays.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev Collection of functions related to array types.\n */\nlibrary Arrays {\n /**\n * @dev Searches a sorted `array` and returns the first index that contains\n * a value greater or equal to `element`. If no such index exists (i.e. all\n * values in the array are strictly less than `element`), the array length is\n * returned. Time complexity O(log n).\n *\n * `array` is expected to be sorted in ascending order, and to contain no\n * repeated elements.\n */\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\n if (array.length == 0) {\n return 0;\n }\n\n uint256 low = 0;\n uint256 high = array.length;\n\n while (low < high) {\n uint256 mid = Math.average(low, high);\n\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\n // because Math.average rounds down (it does integer division with truncation).\n if (array[mid] > element) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\n if (low > 0 && array[low - 1] == element) {\n return low - 1;\n } else {\n return low;\n }\n }\n}\n" - }, - "contracts/VetoERC20Voting.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/IVetoGuard.sol\";\r\nimport \"./interfaces/IVetoERC20Voting.sol\";\r\nimport \"./TransactionHasher.sol\";\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\nimport \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\r\nimport \"@openzeppelin/contracts/governance/utils/IVotes.sol\";\r\n\r\n/// @notice A contract for casting veto votes with an ERC20 votes token\r\ncontract VetoERC20Voting is\r\n IVetoERC20Voting,\r\n TransactionHasher,\r\n FactoryFriendly\r\n{\r\n uint256 public vetoVotesThreshold; // Number of votes required to veto a transaction\r\n uint256 public freezeVotesThreshold; // Number of freeze votes required to activate a freeze\r\n uint256 public freezeProposalCreatedBlock; // Block number the freeze proposal was created at\r\n uint256 public freezeProposalVoteCount; // Number of accrued freeze votes\r\n uint256 public freezeProposalBlockDuration; // Number of blocks a freeze proposal has to succeed\r\n uint256 public freezeBlockDuration; // Number of blocks a freeze last, from time of freeze proposal creation\r\n IVotes public votesToken;\r\n IVetoGuard public vetoGuard;\r\n mapping(bytes32 => uint256) public transactionVetoVotes;\r\n mapping(address => mapping(bytes32 => bool)) public userHasVoted;\r\n mapping(address => mapping(uint256 => bool)) public userHasFreezeVoted;\r\n\r\n /// @notice Initialize function, will be triggered when a new proxy is deployed\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n __Ownable_init();\r\n (\r\n address _owner,\r\n uint256 _vetoVotesThreshold,\r\n uint256 _freezeVotesThreshold,\r\n uint256 _freezeProposalBlockDuration,\r\n uint256 _freezeBlockDuration,\r\n address _votesToken,\r\n address _vetoGuard\r\n ) = abi.decode(initializeParams, (address, uint256, uint256, uint256, uint256, address, address));\r\n\r\n _transferOwnership(_owner);\r\n vetoVotesThreshold = _vetoVotesThreshold;\r\n freezeVotesThreshold = _freezeVotesThreshold;\r\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\r\n freezeBlockDuration = _freezeBlockDuration;\r\n votesToken = IVotes(_votesToken);\r\n vetoGuard = IVetoGuard(_vetoGuard);\r\n }\r\n\r\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\r\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external {\r\n // Check that user has not yet voted\r\n require(\r\n !userHasVoted[msg.sender][_transactionHash],\r\n \"User has already voted\"\r\n );\r\n\r\n // Get the block number the transaction was queued on the VetoGuard\r\n uint256 queuedBlockNumber = vetoGuard.getTransactionQueuedBlock(\r\n _transactionHash\r\n );\r\n\r\n // Check that the transaction has been queued\r\n require(queuedBlockNumber != 0, \"Transaction has not yet been queued\");\r\n\r\n uint256 vetoVotes = votesToken.getPastVotes(\r\n msg.sender,\r\n queuedBlockNumber - 1\r\n );\r\n\r\n require(vetoVotes > 0, \"User has no votes\");\r\n\r\n // Add the user votes to the veto vote count for this transaction\r\n transactionVetoVotes[_transactionHash] += vetoVotes;\r\n\r\n // If the user is voting to freeze, count that vote as well\r\n if (_freeze) {\r\n castFreezeVote();\r\n }\r\n\r\n // User has voted\r\n userHasVoted[msg.sender][_transactionHash] = true;\r\n\r\n emit VetoVoteCast(msg.sender, _transactionHash, vetoVotes, _freeze);\r\n }\r\n\r\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\r\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\r\n function castFreezeVote() public {\r\n uint256 userVotes;\r\n\r\n if (\r\n block.number >\r\n freezeProposalCreatedBlock + freezeProposalBlockDuration\r\n ) {\r\n // Create freeze proposal, set total votes to msg.sender's vote count\r\n freezeProposalCreatedBlock = block.number;\r\n\r\n userVotes = votesToken.getPastVotes(\r\n msg.sender,\r\n freezeProposalCreatedBlock - 1\r\n );\r\n require(userVotes > 0, \"User has no votes\");\r\n\r\n freezeProposalVoteCount = userVotes;\r\n\r\n emit FreezeProposalCreated(msg.sender);\r\n } else {\r\n // There is an existing freeze proposal, count user's votes\r\n require(\r\n !userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock],\r\n \"User has already voted\"\r\n );\r\n\r\n userVotes = votesToken.getPastVotes(\r\n msg.sender,\r\n freezeProposalCreatedBlock - 1\r\n );\r\n require(userVotes > 0, \"User has no votes\");\r\n\r\n freezeProposalVoteCount += userVotes;\r\n }\r\n\r\n userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock] = true;\r\n\r\n emit FreezeVoteCast(msg.sender, userVotes);\r\n }\r\n\r\n /// @notice Unfreezes the DAO, only callable by the owner\r\n function defrost() public onlyOwner {\r\n require(isFrozen(), \"DAO is not already frozen\");\r\n freezeProposalCreatedBlock = 0;\r\n freezeProposalVoteCount = 0;\r\n }\r\n\r\n /// @notice Updates the veto votes threshold, only callable by the owner\r\n /// @param _vetoVotesThreshold The number of votes required to veto a transaction\r\n function updateVetoVotesThreshold(uint256 _vetoVotesThreshold)\r\n external\r\n onlyOwner\r\n {\r\n vetoVotesThreshold = _vetoVotesThreshold;\r\n }\r\n\r\n /// @notice Updates the freeze votes threshold, only callable by the owner\r\n /// @param _freezeVotesThreshold Number of freeze votes required to activate a freeze\r\n function updateFreezeVotesThreshold(uint256 _freezeVotesThreshold)\r\n external\r\n onlyOwner\r\n {\r\n freezeVotesThreshold = _freezeVotesThreshold;\r\n }\r\n\r\n /// @notice Updates the freeze proposal blocks duration, only callable by the owner\r\n /// @param _freezeProposalBlockDuration The number of blocks a freeze proposal has to succeed\r\n function updateFreezeProposalBlockDuration(\r\n uint256 _freezeProposalBlockDuration\r\n ) external onlyOwner {\r\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\r\n }\r\n\r\n /// @notice Updates the freeze block duration, only callable by the owner\r\n /// @param _freezeBlockDuration The number of blocks a freeze last, from time of freeze proposal creation\r\n function updateFreezeBlockDuration(uint256 _freezeBlockDuration)\r\n external\r\n onlyOwner\r\n {\r\n freezeBlockDuration = _freezeBlockDuration;\r\n }\r\n\r\n /// @notice Returns whether the specified transaction has been vetoed\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @return bool True if the transaction is vetoed\r\n function getIsVetoed(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver\r\n ) external view returns (bool) {\r\n return\r\n transactionVetoVotes[\r\n getTransactionHash(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n )\r\n ] > vetoVotesThreshold;\r\n }\r\n\r\n /// @notice Returns the number of votes that have been cast to veto the specified transaction\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @return uint256 The number of veto votes that have been cast\r\n function getVetoVotes(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver\r\n ) external view returns (uint256) {\r\n return\r\n transactionVetoVotes[\r\n getTransactionHash(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n )\r\n ];\r\n }\r\n\r\n /// @notice Returns true if the DAO is currently frozen\r\n /// @return bool Indicates whether the DAO is currently frozen\r\n function isFrozen() public view returns (bool) {\r\n if (\r\n freezeProposalVoteCount > freezeVotesThreshold &&\r\n block.number < freezeProposalCreatedBlock + freezeBlockDuration\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n" - }, - "contracts/interfaces/IVetoGuard.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\ninterface IVetoGuard {\r\n event VetoGuardSetup(\r\n address creator,\r\n uint256 executionDelayBlocks,\r\n address indexed owner,\r\n address indexed vetoERC20Voting\r\n );\r\n\r\n event TransactionQueued(\r\n address indexed queuer,\r\n bytes32 indexed transactionHash,\r\n bytes indexed signatures\r\n );\r\n\r\n /// @notice Allows a user to queue the transaction, requires valid signatures\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\r\n function queueTransaction(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory signatures\r\n ) external;\r\n\r\n /// @notice Gets the block number that the transaction was queued at\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @return uint256 The block number\r\n function getTransactionQueuedBlock(bytes32 _transactionHash)\r\n external\r\n view\r\n returns (uint256);\r\n}\r\n" - }, - "contracts/interfaces/IVetoERC20Voting.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\ninterface IVetoERC20Voting {\r\n event VetoVoteCast(\r\n address indexed voter,\r\n bytes32 indexed transactionHash,\r\n uint256 votesCast,\r\n bool freeze\r\n );\r\n\r\n event FreezeVoteCast(address indexed voter, uint256 votesCast);\r\n\r\n event FreezeProposalCreated(address indexed creator);\r\n\r\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\r\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external;\r\n\r\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\r\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\r\n function castFreezeVote() external;\r\n\r\n /// @notice Returns whether the specified functions has been vetoed\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @return bool True if the transaction is vetoed\r\n function getIsVetoed(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver\r\n ) external view returns (bool);\r\n\r\n /// @notice Returns true if the DAO is currently frozen\r\n /// @return bool Indicates whether the DAO is currently frozen\r\n function isFrozen() external view returns (bool);\r\n}\r\n" - }, - "contracts/TransactionHasher.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\nabstract contract TransactionHasher {\r\n /// @dev Returns the hash of all the transaction data\r\n /// @dev It is important to note that this implementation is different than that in the Gnosis Safe contract\r\n /// @dev This implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interface\r\n /// @dev This implementation also omits the EIP-712 related values, since these hashes are not being signed by users\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @return Transaction hash bytes.\r\n function getTransactionHash(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address refundReceiver\r\n ) public pure returns (bytes32) {\r\n return keccak256(\r\n abi.encode(\r\n to,\r\n value,\r\n keccak256(data),\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n )\r\n );\r\n }\r\n}" - }, - "@gnosis.pm/safe-contracts/contracts/common/Enum.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - \ncontract Enum {\n enum Operation {Call, DelegateCall}\n}\n" - }, - "@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n function setUp(bytes memory initializeParams) public virtual;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n * initialization step. This is essential to configure modules that are added through upgrades and that require\n * initialization.\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 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 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" - }, - "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @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}\n" - }, - "contracts/VetoGuard.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/IVetoGuard.sol\";\r\nimport \"./interfaces/IVetoERC20Voting.sol\";\r\nimport \"./interfaces/IGnosisSafe.sol\";\r\nimport \"./TransactionHasher.sol\";\r\nimport \"./FractalBaseGuard.sol\";\r\nimport \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\n/// @notice A guard contract that prevents transactions that have been vetoed from being executed on the Gnosis Safe\r\ncontract VetoGuard is\r\n TransactionHasher,\r\n FactoryFriendly,\r\n FractalBaseGuard,\r\n IVetoGuard\r\n{\r\n uint256 public executionDelayBlocks;\r\n IVetoERC20Voting public vetoERC20Voting;\r\n IGnosisSafe public gnosisSafe;\r\n mapping(bytes32 => uint256) transactionQueuedBlock;\r\n\r\n /// @notice Initialize function, will be triggered when a new proxy is deployed\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n __Ownable_init();\r\n (\r\n uint256 _executionDelayBlocks,\r\n address _owner,\r\n address _vetoERC20Voting,\r\n address _gnosisSafe // Address(0) == msg.sender\r\n ) = abi.decode(initializeParams, (uint256, address, address, address));\r\n\r\n executionDelayBlocks = _executionDelayBlocks;\r\n transferOwnership(_owner);\r\n vetoERC20Voting = IVetoERC20Voting(_vetoERC20Voting);\r\n gnosisSafe = IGnosisSafe(\r\n _gnosisSafe == address(0) ? msg.sender : _gnosisSafe\r\n );\r\n\r\n emit VetoGuardSetup(\r\n msg.sender,\r\n _executionDelayBlocks,\r\n _owner,\r\n _vetoERC20Voting\r\n );\r\n }\r\n\r\n /// @notice Allows a user to queue the transaction, requires valid signatures\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\r\n function queueTransaction(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory signatures\r\n ) external {\r\n bytes32 transactionHash = getTransactionHash(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n );\r\n\r\n require(\r\n transactionQueuedBlock[transactionHash] == 0,\r\n \"Transaction has already been queued\"\r\n );\r\n\r\n bytes memory gnosisTransactionHash = gnosisSafe.encodeTransactionData(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver,\r\n gnosisSafe.nonce()\r\n );\r\n\r\n // If signatures are not valid, this will revert\r\n gnosisSafe.checkSignatures(\r\n keccak256(gnosisTransactionHash),\r\n gnosisTransactionHash,\r\n signatures\r\n );\r\n\r\n transactionQueuedBlock[transactionHash] = block.number;\r\n\r\n emit TransactionQueued(msg.sender, transactionHash, signatures);\r\n }\r\n\r\n /// @notice This function is called by the Gnosis Safe to check if the transaction should be able to be executed\r\n /// @notice Reverts if this transaction cannot be executed\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n function checkTransaction(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory,\r\n address\r\n ) external view override {\r\n bytes32 transactionHash = getTransactionHash(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n );\r\n\r\n require(\r\n transactionQueuedBlock[transactionHash] != 0,\r\n \"Transaction has not been queued yet\"\r\n );\r\n\r\n require(\r\n block.number >=\r\n transactionQueuedBlock[transactionHash] + executionDelayBlocks,\r\n \"Transaction delay period has not completed yet\"\r\n );\r\n\r\n require(\r\n !vetoERC20Voting.getIsVetoed(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n ),\r\n \"Transaction has been vetoed\"\r\n );\r\n\r\n require(!vetoERC20Voting.isFrozen(), \"DAO is frozen\");\r\n }\r\n\r\n /// @notice Does checks after transaction is executed on the Gnosis Safe\r\n /// @param txHash The hash of the transaction that was executed\r\n /// @param success Boolean indicating whether the Gnosis Safe successfully executed the tx\r\n function checkAfterExecution(bytes32 txHash, bool success)\r\n external\r\n view\r\n override\r\n {}\r\n\r\n /// @notice Gets the block number that the transaction was queued at\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @return uint256 The block number\r\n function getTransactionQueuedBlock(bytes32 _transactionHash)\r\n public\r\n view\r\n returns (uint256)\r\n {\r\n return transactionQueuedBlock[_transactionHash];\r\n }\r\n\r\n\r\n /// @notice Can be used to check if this contract supports the specified interface\r\n /// @param interfaceId The bytes representing the interfaceId being checked\r\n /// @return bool True if this contract supports the checked interface\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (FractalBaseGuard)\r\n returns (bool)\r\n {\r\n return\r\n interfaceId == type(IVetoGuard).interfaceId ||\r\n super.supportsInterface(interfaceId);\r\n }\r\n}\r\n" - }, - "contracts/interfaces/IGnosisSafe.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\ninterface IGnosisSafe {\r\n function nonce() external view returns (uint256);\r\n\r\n /// @dev Setup function sets initial storage of contract.\r\n /// @param _owners List of Safe owners.\r\n /// @param _threshold Number of required confirmations for a Safe transaction.\r\n /// @param to Contract address for optional delegate call.\r\n /// @param data Data payload for optional delegate call.\r\n /// @param fallbackHandler Handler for fallback calls to this contract\r\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\r\n /// @param payment Value that should be paid\r\n /// @param paymentReceiver Address that should receive the payment (or 0 if tx.origin)\r\n function setup(\r\n address[] calldata _owners,\r\n uint256 _threshold,\r\n address to,\r\n bytes calldata data,\r\n address fallbackHandler,\r\n address paymentToken,\r\n uint256 payment,\r\n address payable paymentReceiver\r\n ) external;\r\n\r\n function setGuard(address guard) external;\r\n\r\n function execTransaction(\r\n address to,\r\n uint256 value,\r\n bytes calldata data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory signatures\r\n ) external payable returns (bool success);\r\n\r\n /**\r\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\r\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\r\n * @param data That should be signed (this is passed to an external validator contract)\r\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\r\n */\r\n function checkSignatures(\r\n bytes32 dataHash,\r\n bytes memory data,\r\n bytes memory signatures\r\n ) external view;\r\n\r\n /// @dev Returns the bytes that are hashed to be signed by owners.\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @param _nonce Transaction nonce.\r\n /// @return Transaction hash bytes.\r\n function encodeTransactionData(\r\n address to,\r\n uint256 value,\r\n bytes calldata data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address refundReceiver,\r\n uint256 _nonce\r\n ) external view returns (bytes memory);\r\n}\r\n" - }, - "contracts/FractalBaseGuard.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\nimport \"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\";\r\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\r\n\r\nabstract contract FractalBaseGuard is ERC165 {\r\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\r\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\r\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\r\n function checkTransaction(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory signatures,\r\n address msgSender\r\n ) external virtual;\r\n\r\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\r\n\r\n /// @notice Can be used to check if this contract supports the specified interface\r\n /// @param interfaceId The bytes representing the interfaceId being checked\r\n /// @return bool True if this contract supports the checked interface\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n return\r\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\r\n super.supportsInterface(interfaceId); // 0x01ffc9a7\r\n }\r\n}\r\n" - }, - "@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IGuard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n" - }, - "contracts/interfaces/IFractalModule.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\r\n\r\ninterface IFractalModule {\r\n event ControllersAdded(address[] controllers);\r\n event ControllersRemoved(address[] controllers);\r\n\r\n /// @notice Allows an authorized user to exec a Gnosis Safe tx via the module\r\n /// @param execTxData Data payload of module transaction.\r\n function execTx(bytes memory execTxData) external;\r\n\r\n /// @notice Allows the module owner to add users which may exectxs\r\n /// @param _controllers Addresses added to the contoller list\r\n function addControllers(address[] memory _controllers) external;\r\n\r\n /// @notice Allows the module owner to remove users which may exectxs\r\n /// @param _controllers Addresses removed to the contoller list\r\n function removeControllers(address[] memory _controllers) external;\r\n}\r\n" - }, - "@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IGuard.sol\";\n\nabstract contract BaseGuard is IERC165 {\n function supportsInterface(bytes4 interfaceId)\n external\n pure\n override\n returns (bool)\n {\n return\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\n }\n\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external virtual;\n\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\n}\n" - }, - "@gnosis.pm/zodiac/contracts/guard/Guardable.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./BaseGuard.sol\";\n\n/// @title Guardable - A contract that manages fallback calls made to this contract\ncontract Guardable is OwnableUpgradeable {\n address public guard;\n\n event ChangedGuard(address guard);\n\n /// `guard_` does not implement IERC165.\n error NotIERC165Compliant(address guard_);\n\n /// @dev Set a guard that checks transactions before execution.\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\n function setGuard(address _guard) external onlyOwner {\n if (_guard != address(0)) {\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\n revert NotIERC165Compliant(_guard);\n }\n guard = _guard;\n emit ChangedGuard(guard);\n }\n\n function getGuard() external view returns (address _guard) {\n return guard;\n }\n}\n" - }, - "@gnosis.pm/zodiac/contracts/core/Module.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/IAvatar.sol\";\nimport \"../factory/FactoryFriendly.sol\";\nimport \"../guard/Guardable.sol\";\n\nabstract contract Module is FactoryFriendly, Guardable {\n /// @dev Address that will ultimately execute function calls.\n address public avatar;\n /// @dev Address that this module will pass transactions to.\n address public target;\n\n /// @dev Emitted each time the avatar is set.\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n /// @dev Emitted each time the Target is set.\n event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\n /// @notice Can only be called by the current owner.\n function setAvatar(address _avatar) public onlyOwner {\n address previousAvatar = avatar;\n avatar = _avatar;\n emit AvatarSet(previousAvatar, _avatar);\n }\n\n /// @dev Sets the target to a new target (`newTarget`).\n /// @notice Can only be called by the current owner.\n function setTarget(address _target) public onlyOwner {\n address previousTarget = target;\n target = _target;\n emit TargetSet(previousTarget, _target);\n }\n\n /// @dev Passes a transaction to be executed by the avatar.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success) {\n /// Check if a transactioon guard is enabled.\n if (guard != address(0)) {\n IGuard(guard).checkTransaction(\n /// Transaction info used by module transactions.\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n bytes(\"0x\"),\n msg.sender\n );\n }\n success = IAvatar(target).execTransactionFromModule(\n to,\n value,\n data,\n operation\n );\n if (guard != address(0)) {\n IGuard(guard).checkAfterExecution(bytes32(\"0x\"), success);\n }\n return success;\n }\n\n /// @dev Passes a transaction to be executed by the target and returns data.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execAndReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success, bytes memory returnData) {\n /// Check if a transactioon guard is enabled.\n if (guard != address(0)) {\n IGuard(guard).checkTransaction(\n /// Transaction info used by module transactions.\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n bytes(\"0x\"),\n msg.sender\n );\n }\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(to, value, data, operation);\n if (guard != address(0)) {\n IGuard(guard).checkAfterExecution(bytes32(\"0x\"), success);\n }\n return (success, returnData);\n }\n}\n" - }, - "@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n /// @dev Enables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Modules should be stored as a linked list.\n /// @notice Must emit EnabledModule(address module) if successful.\n /// @param module Module to be enabled.\n function enableModule(address module) external;\n\n /// @dev Disables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Must emit DisabledModule(address module) if successful.\n /// @param prevModule Address that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) external;\n\n /// @dev Allows a Module to execute a transaction.\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success);\n\n /// @dev Allows a Module to execute a transaction and return data\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success, bytes memory returnData);\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) external view returns (bool);\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next);\n}\n" - }, - "contracts/FractalModule.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/zodiac/contracts/core/Module.sol\";\r\nimport \"./interfaces/IFractalModule.sol\";\r\n\r\ncontract FractalModule is IFractalModule, Module {\r\n mapping(address => bool) public controllers; // A DAO may authorize users to act on the behalf of the parent DAO.\r\n\r\n /// @dev Throws if called by any account other than the owner.\r\n modifier onlyAuthorized() {\r\n require(\r\n owner() == msg.sender || controllers[msg.sender],\r\n \"Not Authorized\"\r\n );\r\n _;\r\n }\r\n\r\n /// @dev Initialize function\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n __Ownable_init();\r\n (\r\n address _owner, // Controlling DAO\r\n address _avatar, // GSafe // Address(0) == msg.sender\r\n address _target, // GSafe or Modifier // Address(0) == msg.sender\r\n address[] memory _controllers // Authorized controllers\r\n ) = abi.decode(\r\n initializeParams,\r\n (address, address, address, address[])\r\n );\r\n\r\n setAvatar(_avatar == address(0) ? msg.sender : _avatar);\r\n setTarget(_target == address(0) ? msg.sender : _target);\r\n addControllers(_controllers);\r\n transferOwnership(_owner);\r\n }\r\n\r\n /// @notice Allows an authorized user to exec a Gnosis Safe tx via the module\r\n /// @param execTxData Data payload of module transaction.\r\n function execTx(bytes memory execTxData) public onlyAuthorized {\r\n (\r\n address _target,\r\n uint256 _value,\r\n bytes memory _data,\r\n Enum.Operation _operation\r\n ) = abi.decode(execTxData, (address, uint256, bytes, Enum.Operation));\r\n require(\r\n exec(_target, _value, _data, _operation),\r\n \"Module transaction failed\"\r\n );\r\n }\r\n\r\n /// @notice Allows the module owner to add users which may exectxs\r\n /// @param _controllers Addresses added to the contoller list\r\n function addControllers(address[] memory _controllers) public onlyOwner {\r\n uint256 controllersLength = _controllers.length;\r\n for (uint256 i; i < controllersLength; ) {\r\n controllers[_controllers[i]] = true;\r\n unchecked {\r\n ++i;\r\n }\r\n }\r\n emit ControllersAdded(_controllers);\r\n }\r\n\r\n /// @notice Allows the module owner to remove users which may exectxs\r\n /// @param _controllers Addresses removed to the contoller list\r\n function removeControllers(address[] memory _controllers)\r\n external\r\n onlyOwner\r\n {\r\n uint256 controllersLength = _controllers.length;\r\n for (uint256 i; i < controllersLength; ) {\r\n controllers[_controllers[i]] = false;\r\n unchecked {\r\n ++i;\r\n }\r\n }\r\n emit ControllersRemoved(_controllers);\r\n }\r\n\r\n /// @notice Returns whether a given interface ID is supported\r\n /// @param interfaceId An interface ID bytes4 as defined by ERC-165\r\n /// @return bool Indicates whether the interface is supported\r\n function supportsInterface(bytes4 interfaceId)\r\n external\r\n pure\r\n returns (bool)\r\n {\r\n return\r\n interfaceId == type(IFractalModule).interfaceId || // 0xe6d7a83a\r\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\r\n }\r\n}\r\n" - }, - "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/draft-IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) 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(\n IERC20 token,\n address spender,\n uint256 value\n ) 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 function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n function safePermit(\n IERC20Permit 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(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!Address.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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n * initialization step. This is essential to configure modules that are added through upgrades and that require\n * initialization.\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 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 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" - }, - "contracts/ClaimSubsidiary.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/IClaimSubsidiary.sol\";\r\nimport \"./VotesToken.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\r\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\r\n\r\ncontract ClaimSubsidiary is Initializable, IClaimSubsidiary {\r\n using SafeERC20 for IERC20;\r\n\r\n address public cToken;\r\n address public pToken;\r\n uint256 public snapId;\r\n uint256 public pAllocation;\r\n mapping(address => bool) isSnapClaimed;\r\n\r\n /// @notice Initilize Claim Contract\r\n /// @param _metaFactory Address funding claimContract\r\n /// @param _pToken Address of the parent token used for snapshot reference\r\n /// @param _cToken Address of child Token being claimed\r\n /// @param _pAllocation Total tokens allocated for pToken holders\r\n function initialize(\r\n address _metaFactory,\r\n address _pToken,\r\n address _cToken,\r\n uint256 _pAllocation\r\n ) external initializer {\r\n cToken = _cToken;\r\n _createSubsidiary(_metaFactory, _pToken, _cToken, _pAllocation);\r\n }\r\n\r\n ////////////////////////// SnapShot //////////////////////////////////\r\n /// @notice This function allows pToken holders to claim cTokens\r\n /// @param claimer Address which is being claimed for\r\n function claimSnap(address claimer) external {\r\n uint256 amount = calculateClaimAmount(claimer); // Get user balance\r\n if (amount == 0) revert NoAllocation();\r\n isSnapClaimed[claimer] = true;\r\n IERC20(cToken).safeTransfer(claimer, amount); // transfer user balance\r\n emit SnapClaimed(pToken, cToken, claimer, amount);\r\n }\r\n\r\n //////////////////// View Functions //////////////////////////\r\n /// @notice Calculate a users cToken allocation\r\n /// @param claimer Address which is being claimed for\r\n /// @return cTokenAllocation Users cToken allocation\r\n function calculateClaimAmount(address claimer)\r\n public\r\n view\r\n returns (uint256 cTokenAllocation)\r\n {\r\n cTokenAllocation = isSnapClaimed[claimer] ? 0 :\r\n (VotesToken(pToken).balanceOfAt(claimer, snapId) * pAllocation) /\r\n VotesToken(pToken).totalSupplyAt(snapId);\r\n }\r\n\r\n //////////////////// Internal Functions //////////////////////////\r\n /// @notice This function creates a cToken and assigns a snapshot Id for pToken holder claims\r\n /// @param _pToken Address of the parent token used for snapshot reference\r\n /// @param _cToken Address of child Token being claimed\r\n /// @param _pAllocation Total tokens allocated for pToken holders\r\n /// @return _snapId snapId number\r\n function _createSubsidiary(\r\n address _metaFactory,\r\n address _pToken,\r\n address _cToken,\r\n uint256 _pAllocation\r\n ) internal returns (uint256 _snapId) {\r\n IERC20(_cToken).transferFrom(_metaFactory, address(this), _pAllocation);\r\n _snapId = VotesToken(_pToken).captureSnapShot();\r\n pToken = _pToken;\r\n snapId = _snapId;\r\n pAllocation = _pAllocation;\r\n emit SnapAdded(_pToken, _cToken, _pAllocation);\r\n }\r\n\r\n /// @dev This empty reserved space is put in place to allow future versions to add new\r\n /// variables without shifting down storage in the inheritance chain.\r\n /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\r\n uint256[48] private __gap;\r\n}\r\n" - }, - "contracts/interfaces/IClaimSubsidiary.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\ninterface IClaimSubsidiary {\r\n error NoAllocation();\r\n error AllocationClaimed();\r\n event SnapAdded(address pToken, address cToken, uint256 pAllocation);\r\n event SnapClaimed(\r\n address indexed pToken,\r\n address indexed cToken,\r\n address indexed claimer,\r\n uint256 amount\r\n );\r\n\r\n /// @notice Initilize Claim Contract\r\n /// @param _metaFactory Address funding claimContract\r\n /// @param _pToken Address of the parent token used for snapshot reference\r\n /// @param _cToken Address of child Token being claimed\r\n /// @param _pAllocation Total tokens allocated for pToken holders\r\n function initialize(\r\n address _metaFactory,\r\n address _pToken,\r\n address _cToken,\r\n uint256 _pAllocation\r\n ) external;\r\n\r\n /// @notice This function allows pToken holders to claim cTokens\r\n /// @param claimer Address which is being claimed for\r\n function claimSnap(address claimer) external;\r\n\r\n //////////////////// View Functions //////////////////////////\r\n /// @notice Calculate a users cToken allocation\r\n /// @param claimer Address which is being claimed for\r\n /// @return cTokenAllocation Users cToken allocation\r\n function calculateClaimAmount(address claimer)\r\n external\r\n view\r\n returns (uint256 cTokenAllocation);\r\n}\r\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "storageLayout", - "devdoc", - "userdoc", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/deployments/goerli/solcInputs/b2fc18a2e663b1410a34647a57a06e84.json b/deployments/goerli/solcInputs/b2fc18a2e663b1410a34647a57a06e84.json new file mode 100644 index 00000000..518c826f --- /dev/null +++ b/deployments/goerli/solcInputs/b2fc18a2e663b1410a34647a57a06e84.json @@ -0,0 +1,218 @@ +{ + "language": "Solidity", + "sources": { + "contracts/FractalBaseGuard.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\nimport \"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\";\r\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\r\n\r\nabstract contract FractalBaseGuard is ERC165 {\r\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\r\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\r\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\r\n function checkTransaction(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory signatures,\r\n address msgSender\r\n ) external virtual;\r\n\r\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\r\n\r\n /// @notice Can be used to check if this contract supports the specified interface\r\n /// @param interfaceId The bytes representing the interfaceId being checked\r\n /// @return bool True if this contract supports the checked interface\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n return\r\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\r\n super.supportsInterface(interfaceId); // 0x01ffc9a7\r\n }\r\n}\r\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Enum.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - \ncontract Enum {\n enum Operation {Call, DelegateCall}\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IGuard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n" + }, + "@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" + }, + "@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" + }, + "contracts/VetoGuard.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/IVetoGuard.sol\";\r\nimport \"./interfaces/IVetoVoting.sol\";\r\nimport \"./interfaces/IGnosisSafe.sol\";\r\nimport \"./TransactionHasher.sol\";\r\nimport \"./FractalBaseGuard.sol\";\r\nimport \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\n/// @notice A guard contract that prevents transactions that have been vetoed from being executed on the Gnosis Safe\r\ncontract VetoGuard is\r\n TransactionHasher,\r\n FactoryFriendly,\r\n FractalBaseGuard,\r\n IVetoGuard\r\n{\r\n uint256 public executionDelayBlocks;\r\n IVetoVoting public vetoVoting;\r\n IGnosisSafe public gnosisSafe;\r\n mapping(bytes32 => uint256) transactionQueuedBlock;\r\n\r\n /// @notice Initialize function, will be triggered when a new proxy is deployed\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n __Ownable_init();\r\n (\r\n uint256 _executionDelayBlocks,\r\n address _owner,\r\n address _vetoVoting,\r\n address _gnosisSafe // Address(0) == msg.sender\r\n ) = abi.decode(initializeParams, (uint256, address, address, address));\r\n\r\n executionDelayBlocks = _executionDelayBlocks;\r\n transferOwnership(_owner);\r\n vetoVoting = IVetoVoting(_vetoVoting);\r\n gnosisSafe = IGnosisSafe(\r\n _gnosisSafe == address(0) ? msg.sender : _gnosisSafe\r\n );\r\n\r\n emit VetoGuardSetup(\r\n msg.sender,\r\n _executionDelayBlocks,\r\n _owner,\r\n _vetoVoting\r\n );\r\n }\r\n\r\n /// @notice Allows a user to queue the transaction, requires valid signatures\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\r\n function queueTransaction(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory signatures\r\n ) external {\r\n bytes32 transactionHash = getTransactionHash(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n );\r\n\r\n require(\r\n transactionQueuedBlock[transactionHash] == 0,\r\n \"Transaction has already been queued\"\r\n );\r\n\r\n bytes memory gnosisTransactionHash = gnosisSafe.encodeTransactionData(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver,\r\n gnosisSafe.nonce()\r\n );\r\n\r\n // If signatures are not valid, this will revert\r\n gnosisSafe.checkSignatures(\r\n keccak256(gnosisTransactionHash),\r\n gnosisTransactionHash,\r\n signatures\r\n );\r\n\r\n transactionQueuedBlock[transactionHash] = block.number;\r\n\r\n emit TransactionQueued(msg.sender, transactionHash, signatures);\r\n }\r\n\r\n /// @notice Updates the execution delay blocks, only callable by the owner\r\n /// @param _executionDelayBlocks The number of blocks between when a transaction is queued and can be executed\r\n function updateExecutionDelayBlocks(uint256 _executionDelayBlocks)\r\n external\r\n onlyOwner\r\n {\r\n executionDelayBlocks = _executionDelayBlocks;\r\n }\r\n\r\n /// @notice This function is called by the Gnosis Safe to check if the transaction should be able to be executed\r\n /// @notice Reverts if this transaction cannot be executed\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n function checkTransaction(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory,\r\n address\r\n ) external view override {\r\n bytes32 transactionHash = getTransactionHash(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n );\r\n\r\n require(\r\n transactionQueuedBlock[transactionHash] != 0,\r\n \"Transaction has not been queued yet\"\r\n );\r\n\r\n require(\r\n block.number >=\r\n transactionQueuedBlock[transactionHash] + executionDelayBlocks,\r\n \"Transaction delay period has not completed yet\"\r\n );\r\n\r\n require(\r\n !vetoVoting.getIsVetoed(\r\n getTransactionHash(\r\n to,\r\n value,\r\n data,\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n )\r\n ),\r\n \"Transaction has been vetoed\"\r\n );\r\n\r\n require(!vetoVoting.isFrozen(), \"DAO is frozen\");\r\n }\r\n\r\n /// @notice Does checks after transaction is executed on the Gnosis Safe\r\n /// @param txHash The hash of the transaction that was executed\r\n /// @param success Boolean indicating whether the Gnosis Safe successfully executed the tx\r\n function checkAfterExecution(bytes32 txHash, bool success)\r\n external\r\n view\r\n override\r\n {}\r\n\r\n /// @notice Gets the block number that the transaction was queued at\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @return uint256 The block number\r\n function getTransactionQueuedBlock(bytes32 _transactionHash)\r\n public\r\n view\r\n returns (uint256)\r\n {\r\n return transactionQueuedBlock[_transactionHash];\r\n }\r\n\r\n /// @notice Can be used to check if this contract supports the specified interface\r\n /// @param interfaceId The bytes representing the interfaceId being checked\r\n /// @return bool True if this contract supports the checked interface\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override(FractalBaseGuard)\r\n returns (bool)\r\n {\r\n return\r\n interfaceId == type(IVetoGuard).interfaceId ||\r\n super.supportsInterface(interfaceId);\r\n }\r\n}\r\n" + }, + "contracts/interfaces/IVetoGuard.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\ninterface IVetoGuard {\r\n event VetoGuardSetup(\r\n address creator,\r\n uint256 executionDelayBlocks,\r\n address indexed owner,\r\n address indexed vetoERC20Voting\r\n );\r\n\r\n event TransactionQueued(\r\n address indexed queuer,\r\n bytes32 indexed transactionHash,\r\n bytes indexed signatures\r\n );\r\n\r\n /// @notice Allows a user to queue the transaction, requires valid signatures\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\r\n function queueTransaction(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory signatures\r\n ) external;\r\n\r\n /// @notice Updates the execution delay blocks\r\n /// @param _executionDelayBlocks The number of blocks between when a transaction is queued and can be executed\r\n function updateExecutionDelayBlocks(\r\n uint256 _executionDelayBlocks\r\n ) external;\r\n\r\n /// @notice Gets the block number that the transaction was queued at\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @return uint256 The block number\r\n function getTransactionQueuedBlock(bytes32 _transactionHash)\r\n external\r\n view\r\n returns (uint256);\r\n}\r\n" + }, + "contracts/interfaces/IVetoVoting.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\ninterface IVetoVoting {\r\n event VetoVoteCast(\r\n address indexed voter,\r\n bytes32 indexed transactionHash,\r\n uint256 votesCast,\r\n bool freeze\r\n );\r\n\r\n event FreezeVoteCast(address indexed voter, uint256 votesCast);\r\n\r\n event FreezeProposalCreated(address indexed creator);\r\n\r\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\r\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external;\r\n\r\n /// @notice Allows a user to cast a freeze vote if there is an active freeze proposal\r\n /// @notice If there isn't an active freeze proposal, it is created and the user's votes are cast\r\n function castFreezeVote() external;\r\n\r\n /// @notice Returns whether the specified transaction has been vetoed\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @return bool True if the transaction is vetoed\r\n function getIsVetoed(bytes32 _transactionHash) external view returns (bool);\r\n\r\n /// @notice Returns true if the DAO is currently frozen, false otherwise\r\n /// @return bool Indicates whether the DAO is currently frozen\r\n function isFrozen() external view returns (bool);\r\n}\r\n" + }, + "contracts/interfaces/IGnosisSafe.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\ninterface IGnosisSafe {\r\n function nonce() external view returns (uint256);\r\n\r\n /// @dev Setup function sets initial storage of contract.\r\n /// @param _owners List of Safe owners.\r\n /// @param _threshold Number of required confirmations for a Safe transaction.\r\n /// @param to Contract address for optional delegate call.\r\n /// @param data Data payload for optional delegate call.\r\n /// @param fallbackHandler Handler for fallback calls to this contract\r\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\r\n /// @param payment Value that should be paid\r\n /// @param paymentReceiver Address that should receive the payment (or 0 if tx.origin)\r\n function setup(\r\n address[] calldata _owners,\r\n uint256 _threshold,\r\n address to,\r\n bytes calldata data,\r\n address fallbackHandler,\r\n address paymentToken,\r\n uint256 payment,\r\n address payable paymentReceiver\r\n ) external;\r\n\r\n function setGuard(address guard) external;\r\n\r\n function execTransaction(\r\n address to,\r\n uint256 value,\r\n bytes calldata data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address payable refundReceiver,\r\n bytes memory signatures\r\n ) external payable returns (bool success);\r\n\r\n /**\r\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\r\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\r\n * @param data That should be signed (this is passed to an external validator contract)\r\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\r\n */\r\n function checkSignatures(\r\n bytes32 dataHash,\r\n bytes memory data,\r\n bytes memory signatures\r\n ) external view;\r\n\r\n /// @dev Returns the bytes that are hashed to be signed by owners.\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @param _nonce Transaction nonce.\r\n /// @return Transaction hash bytes.\r\n function encodeTransactionData(\r\n address to,\r\n uint256 value,\r\n bytes calldata data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address refundReceiver,\r\n uint256 _nonce\r\n ) external view returns (bytes memory);\r\n\r\n /// @notice Returns whether the passed address is an owner\r\n /// @param owner The address the check\r\n /// @return bool True if the address is an owner\r\n function isOwner(address owner) external view returns (bool);\r\n}\r\n" + }, + "contracts/TransactionHasher.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\n\r\nabstract contract TransactionHasher {\r\n /// @dev Returns the hash of all the transaction data\r\n /// @dev It is important to note that this implementation is different than that in the Gnosis Safe contract\r\n /// @dev This implementation does not use the nonce, as this is not part of the Guard contract checkTransaction interface\r\n /// @dev This implementation also omits the EIP-712 related values, since these hashes are not being signed by users\r\n /// @param to Destination address.\r\n /// @param value Ether value.\r\n /// @param data Data payload.\r\n /// @param operation Operation type.\r\n /// @param safeTxGas Gas that should be used for the safe transaction.\r\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\r\n /// @param gasPrice Maximum gas price that should be used for this transaction.\r\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\r\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\r\n /// @return Transaction hash bytes.\r\n function getTransactionHash(\r\n address to,\r\n uint256 value,\r\n bytes memory data,\r\n Enum.Operation operation,\r\n uint256 safeTxGas,\r\n uint256 baseGas,\r\n uint256 gasPrice,\r\n address gasToken,\r\n address refundReceiver\r\n ) public pure returns (bytes32) {\r\n return keccak256(\r\n abi.encode(\r\n to,\r\n value,\r\n keccak256(data),\r\n operation,\r\n safeTxGas,\r\n baseGas,\r\n gasPrice,\r\n gasToken,\r\n refundReceiver\r\n )\r\n );\r\n }\r\n}" + }, + "@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n function setUp(bytes memory initializeParams) public virtual;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n * initialization step. This is essential to configure modules that are added through upgrades and that require\n * initialization.\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 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 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" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @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}\n" + }, + "contracts/VetoMultisigVoting.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/IVetoGuard.sol\";\r\nimport \"./interfaces/IVetoVoting.sol\";\r\nimport \"./interfaces/IGnosisSafe.sol\";\r\nimport \"./TransactionHasher.sol\";\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\nimport \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\r\n\r\n/// @notice A contract for a parent Multisig DAO to cast veto and freeze votes on a child DAO\r\ncontract VetoMultisigVoting is IVetoVoting, TransactionHasher, FactoryFriendly {\r\n uint256 public vetoVotesThreshold; // Number of votes required to veto a transaction\r\n uint256 public freezeVotesThreshold; // Number of freeze votes required to activate a freeze\r\n uint256 public freezeProposalCreatedBlock; // Block number the freeze proposal was created at\r\n uint256 public freezeProposalVoteCount; // Number of accrued freeze votes\r\n uint256 public freezeProposalBlockDuration; // Number of blocks a freeze proposal has to succeed\r\n uint256 public freezeBlockDuration; // Number of blocks a freeze lasts, from time of freeze proposal creation\r\n IGnosisSafe public gnosisSafe;\r\n IVetoGuard public vetoGuard;\r\n mapping(bytes32 => uint256) public transactionVetoVotes;\r\n mapping(address => mapping(bytes32 => bool)) public userHasVoted;\r\n mapping(address => mapping(uint256 => bool)) public userHasFreezeVoted;\r\n\r\n /// @notice Initialize function, will be triggered when a new proxy is deployed\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n __Ownable_init();\r\n (\r\n address _owner,\r\n uint256 _vetoVotesThreshold,\r\n uint256 _freezeVotesThreshold,\r\n uint256 _freezeProposalBlockDuration,\r\n uint256 _freezeBlockDuration,\r\n address _parentGnosisSafe,\r\n address _vetoGuard\r\n ) = abi.decode(\r\n initializeParams,\r\n (address, uint256, uint256, uint256, uint256, address, address)\r\n );\r\n\r\n _transferOwnership(_owner);\r\n vetoVotesThreshold = _vetoVotesThreshold;\r\n freezeVotesThreshold = _freezeVotesThreshold;\r\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\r\n freezeBlockDuration = _freezeBlockDuration;\r\n gnosisSafe = IGnosisSafe(_parentGnosisSafe);\r\n vetoGuard = IVetoGuard(_vetoGuard);\r\n }\r\n\r\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\r\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external {\r\n // Check that user has not yet voted\r\n require(\r\n !userHasVoted[msg.sender][_transactionHash],\r\n \"User has already voted\"\r\n );\r\n\r\n require(gnosisSafe.isOwner(msg.sender), \"User is not an owner \");\r\n\r\n // Check that the transaction has been queued\r\n require(\r\n vetoGuard.getTransactionQueuedBlock(_transactionHash) != 0,\r\n \"Transaction has not yet been queued\"\r\n );\r\n\r\n // Add the user votes to the veto vote count for this transaction\r\n transactionVetoVotes[_transactionHash]++;\r\n\r\n // If the user is voting to freeze, count that vote as well\r\n if (_freeze) {\r\n _castFreezeVote();\r\n }\r\n\r\n // User has voted\r\n userHasVoted[msg.sender][_transactionHash] = true;\r\n\r\n emit VetoVoteCast(msg.sender, _transactionHash, 1, _freeze);\r\n }\r\n\r\n /// @notice Allows user to cast a freeze vote, creating a freeze proposal if necessary\r\n function castFreezeVote() external {\r\n require(gnosisSafe.isOwner(msg.sender), \"User is not an owner \");\r\n\r\n _castFreezeVote();\r\n }\r\n\r\n /// @notice Allows user to cast a freeze vote, creating a freeze proposal if necessary\r\n function _castFreezeVote() internal {\r\n if (\r\n block.number >\r\n freezeProposalCreatedBlock + freezeProposalBlockDuration\r\n ) {\r\n // Create freeze proposal, count user's vote\r\n freezeProposalCreatedBlock = block.number;\r\n\r\n freezeProposalVoteCount = 1;\r\n\r\n emit FreezeProposalCreated(msg.sender);\r\n } else {\r\n // There is an existing freeze proposal, count user's vote\r\n require(\r\n !userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock],\r\n \"User has already voted\"\r\n );\r\n\r\n freezeProposalVoteCount++;\r\n }\r\n\r\n userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock] = true;\r\n\r\n emit FreezeVoteCast(msg.sender, 1);\r\n }\r\n\r\n /// @notice Unfreezes the DAO, only callable by the owner\r\n function defrost() public onlyOwner {\r\n freezeProposalCreatedBlock = 0;\r\n freezeProposalVoteCount = 0;\r\n }\r\n\r\n /// @notice Updates the veto votes threshold, only callable by the owner\r\n /// @param _vetoVotesThreshold The number of votes required to veto a transaction\r\n function updateVetoVotesThreshold(uint256 _vetoVotesThreshold)\r\n external\r\n onlyOwner\r\n {\r\n vetoVotesThreshold = _vetoVotesThreshold;\r\n }\r\n\r\n /// @notice Updates the freeze votes threshold, only callable by the owner\r\n /// @param _freezeVotesThreshold Number of freeze votes required to activate a freeze\r\n function updateFreezeVotesThreshold(uint256 _freezeVotesThreshold)\r\n external\r\n onlyOwner\r\n {\r\n freezeVotesThreshold = _freezeVotesThreshold;\r\n }\r\n\r\n /// @notice Updates the freeze proposal blocks duration, only callable by the owner\r\n /// @param _freezeProposalBlockDuration The number of blocks a freeze proposal has to succeed\r\n function updateFreezeProposalBlockDuration(\r\n uint256 _freezeProposalBlockDuration\r\n ) external onlyOwner {\r\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\r\n }\r\n\r\n /// @notice Updates the freeze block duration, only callable by the owner\r\n /// @param _freezeBlockDuration The number of blocks a freeze last, from time of freeze proposal creation\r\n function updateFreezeBlockDuration(uint256 _freezeBlockDuration)\r\n external\r\n onlyOwner\r\n {\r\n freezeBlockDuration = _freezeBlockDuration;\r\n }\r\n\r\n /// @notice Returns whether the specified transaction has been vetoed\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @return bool True if the transaction is vetoed\r\n function getIsVetoed(bytes32 _transactionHash)\r\n external\r\n view\r\n returns (bool)\r\n {\r\n return transactionVetoVotes[_transactionHash] >= vetoVotesThreshold;\r\n }\r\n\r\n /// @notice Returns true if the DAO is currently frozen, false otherwise\r\n /// @return bool Indicates whether the DAO is currently frozen\r\n function isFrozen() public view returns (bool) {\r\n if (\r\n freezeProposalVoteCount >= freezeVotesThreshold &&\r\n block.number < freezeProposalCreatedBlock + freezeBlockDuration\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n" + }, + "contracts/VetoERC20Voting.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/IVetoGuard.sol\";\r\nimport \"./interfaces/IVetoVoting.sol\";\r\nimport \"./TransactionHasher.sol\";\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\nimport \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\r\nimport \"@openzeppelin/contracts/governance/utils/IVotes.sol\";\r\n\r\n/// @notice A contract for casting veto votes with an ERC20 votes token\r\ncontract VetoERC20Voting is IVetoVoting, TransactionHasher, FactoryFriendly {\r\n uint256 public vetoVotesThreshold; // Number of votes required to veto a transaction\r\n uint256 public freezeVotesThreshold; // Number of freeze votes required to activate a freeze\r\n uint256 public freezeProposalCreatedBlock; // Block number the freeze proposal was created at\r\n uint256 public freezeProposalVoteCount; // Number of accrued freeze votes\r\n uint256 public freezeProposalBlockDuration; // Number of blocks a freeze proposal has to succeed\r\n uint256 public freezeBlockDuration; // Number of blocks a freeze last, from time of freeze proposal creation\r\n IVotes public votesToken;\r\n IVetoGuard public vetoGuard;\r\n mapping(bytes32 => uint256) public transactionVetoVotes;\r\n mapping(address => mapping(bytes32 => bool)) public userHasVoted;\r\n mapping(address => mapping(uint256 => bool)) public userHasFreezeVoted;\r\n\r\n /// @notice Initialize function, will be triggered when a new proxy is deployed\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n __Ownable_init();\r\n (\r\n address _owner,\r\n uint256 _vetoVotesThreshold,\r\n uint256 _freezeVotesThreshold,\r\n uint256 _freezeProposalBlockDuration,\r\n uint256 _freezeBlockDuration,\r\n address _votesToken,\r\n address _vetoGuard\r\n ) = abi.decode(\r\n initializeParams,\r\n (address, uint256, uint256, uint256, uint256, address, address)\r\n );\r\n\r\n _transferOwnership(_owner);\r\n vetoVotesThreshold = _vetoVotesThreshold;\r\n freezeVotesThreshold = _freezeVotesThreshold;\r\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\r\n freezeBlockDuration = _freezeBlockDuration;\r\n votesToken = IVotes(_votesToken);\r\n vetoGuard = IVetoGuard(_vetoGuard);\r\n }\r\n\r\n /// @notice Allows the msg.sender to cast veto and freeze votes on the specified transaction\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @param _freeze Bool indicating whether the voter thinks the DAO should also be frozen\r\n function castVetoVote(bytes32 _transactionHash, bool _freeze) external {\r\n // Check that user has not yet voted\r\n require(\r\n !userHasVoted[msg.sender][_transactionHash],\r\n \"User has already voted\"\r\n );\r\n\r\n // Get the block number the transaction was queued on the VetoGuard\r\n uint256 queuedBlockNumber = vetoGuard.getTransactionQueuedBlock(\r\n _transactionHash\r\n );\r\n\r\n // Check that the transaction has been queued\r\n require(queuedBlockNumber != 0, \"Transaction has not yet been queued\");\r\n\r\n uint256 vetoVotes = votesToken.getPastVotes(\r\n msg.sender,\r\n queuedBlockNumber - 1\r\n );\r\n\r\n require(vetoVotes > 0, \"User has no votes\");\r\n\r\n // Add the user votes to the veto vote count for this transaction\r\n transactionVetoVotes[_transactionHash] += vetoVotes;\r\n\r\n // If the user is voting to freeze, count that vote as well\r\n if (_freeze) {\r\n castFreezeVote();\r\n }\r\n\r\n // User has voted\r\n userHasVoted[msg.sender][_transactionHash] = true;\r\n\r\n emit VetoVoteCast(msg.sender, _transactionHash, vetoVotes, _freeze);\r\n }\r\n\r\n /// @notice Allows user to cast a freeze vote, creating a freeze proposal if necessary\r\n function castFreezeVote() public {\r\n uint256 userVotes;\r\n\r\n if (\r\n block.number >\r\n freezeProposalCreatedBlock + freezeProposalBlockDuration\r\n ) {\r\n // Create freeze proposal, set total votes to msg.sender's vote count\r\n freezeProposalCreatedBlock = block.number;\r\n\r\n userVotes = votesToken.getPastVotes(\r\n msg.sender,\r\n freezeProposalCreatedBlock - 1\r\n );\r\n require(userVotes > 0, \"User has no votes\");\r\n\r\n freezeProposalVoteCount = userVotes;\r\n\r\n emit FreezeProposalCreated(msg.sender);\r\n } else {\r\n // There is an existing freeze proposal, count user's votes\r\n require(\r\n !userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock],\r\n \"User has already voted\"\r\n );\r\n\r\n userVotes = votesToken.getPastVotes(\r\n msg.sender,\r\n freezeProposalCreatedBlock - 1\r\n );\r\n require(userVotes > 0, \"User has no votes\");\r\n\r\n freezeProposalVoteCount += userVotes;\r\n }\r\n\r\n userHasFreezeVoted[msg.sender][freezeProposalCreatedBlock] = true;\r\n\r\n emit FreezeVoteCast(msg.sender, userVotes);\r\n }\r\n\r\n /// @notice Unfreezes the DAO, only callable by the owner\r\n function defrost() public onlyOwner {\r\n freezeProposalCreatedBlock = 0;\r\n freezeProposalVoteCount = 0;\r\n }\r\n\r\n /// @notice Updates the veto votes threshold, only callable by the owner\r\n /// @param _vetoVotesThreshold The number of votes required to veto a transaction\r\n function updateVetoVotesThreshold(uint256 _vetoVotesThreshold)\r\n external\r\n onlyOwner\r\n {\r\n vetoVotesThreshold = _vetoVotesThreshold;\r\n }\r\n\r\n /// @notice Updates the freeze votes threshold, only callable by the owner\r\n /// @param _freezeVotesThreshold Number of freeze votes required to activate a freeze\r\n function updateFreezeVotesThreshold(uint256 _freezeVotesThreshold)\r\n external\r\n onlyOwner\r\n {\r\n freezeVotesThreshold = _freezeVotesThreshold;\r\n }\r\n\r\n /// @notice Updates the freeze proposal blocks duration, only callable by the owner\r\n /// @param _freezeProposalBlockDuration The number of blocks a freeze proposal has to succeed\r\n function updateFreezeProposalBlockDuration(\r\n uint256 _freezeProposalBlockDuration\r\n ) external onlyOwner {\r\n freezeProposalBlockDuration = _freezeProposalBlockDuration;\r\n }\r\n\r\n /// @notice Updates the freeze block duration, only callable by the owner\r\n /// @param _freezeBlockDuration The number of blocks a freeze last, from time of freeze proposal creation\r\n function updateFreezeBlockDuration(uint256 _freezeBlockDuration)\r\n external\r\n onlyOwner\r\n {\r\n freezeBlockDuration = _freezeBlockDuration;\r\n }\r\n\r\n /// @notice Returns whether the specified transaction has been vetoed\r\n /// @param _transactionHash The hash of the transaction data\r\n /// @return bool True if the transaction is vetoed\r\n function getIsVetoed(bytes32 _transactionHash)\r\n external\r\n view\r\n returns (bool)\r\n {\r\n return transactionVetoVotes[_transactionHash] > vetoVotesThreshold;\r\n }\r\n\r\n /// @notice Returns true if the DAO is currently frozen, false otherwise\r\n /// @return bool Indicates whether the DAO is currently frozen\r\n function isFrozen() public view returns (bool) {\r\n if (\r\n freezeProposalVoteCount > freezeVotesThreshold &&\r\n block.number < freezeProposalCreatedBlock + freezeBlockDuration\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/governance/utils/IVotes.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.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 IVotes {\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 the end of a past block (`blockNumber`).\n */\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\n\n /**\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\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 blockNumber) 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(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n" + }, + "contracts/VotesToken.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\r\nimport \"@openzeppelin/contracts/utils/introspection/ERC165Storage.sol\";\r\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\r\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol\";\r\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\";\r\n\r\ncontract VotesToken is\r\n IERC20Upgradeable,\r\n ERC20SnapshotUpgradeable,\r\n ERC20VotesUpgradeable,\r\n ERC165Storage,\r\n FactoryFriendly\r\n{\r\n /// @notice Initialize function, will be triggered when a new proxy is deployed\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n (\r\n string memory _name,\r\n string memory _symbol,\r\n address[] memory _hodlers,\r\n uint256[] memory _allocations // Address(0) == msg.sender\r\n ) = abi.decode(\r\n initializeParams,\r\n (string, string, address[], uint256[])\r\n );\r\n\r\n __ERC20_init(_name, _symbol);\r\n __ERC20Permit_init(_name);\r\n _registerInterface(type(IERC20Upgradeable).interfaceId);\r\n\r\n for (uint256 i = 0; i < _hodlers.length; i++) {\r\n _mint(_hodlers[i], _allocations[i]);\r\n }\r\n }\r\n\r\n function captureSnapShot() external returns (uint256 snapId) {\r\n snapId = _snapshot();\r\n }\r\n\r\n // The functions below are overrides required by Solidity.\r\n function _mint(address to, uint256 amount)\r\n internal\r\n virtual\r\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\r\n {\r\n super._mint(to, amount);\r\n }\r\n\r\n function _burn(address account, uint256 amount)\r\n internal\r\n virtual\r\n override(ERC20Upgradeable, ERC20VotesUpgradeable)\r\n {\r\n super._burn(account, amount);\r\n }\r\n\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual override(ERC20Upgradeable, ERC20SnapshotUpgradeable) {\r\n super._beforeTokenTransfer(from, to, amount);\r\n }\r\n\r\n function _afterTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual override(ERC20Upgradeable, ERC20VotesUpgradeable) {\r\n super._afterTokenTransfer(from, to, amount);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC165.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 ERC165Storage is ERC165 {\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" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-ERC20PermitUpgradeable.sol\";\nimport \"../../../utils/math/MathUpgradeable.sol\";\nimport \"../../../governance/utils/IVotesUpgradeable.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, IVotesUpgradeable, ERC20PermitUpgradeable {\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 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 return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\n }\n\n /**\n * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\n require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n return _checkpointsLookup(_checkpoints[account], blockNumber);\n }\n\n /**\n * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\n * It is but NOT the sum of all the delegated votes!\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {\n require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\n }\n\n /**\n * @dev Lookup a value in a list of (sorted) checkpoints.\n */\n function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\n // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\n //\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 `blockNumber`, we look in [low, mid)\n // - If the middle checkpoint is before or equal to `blockNumber`, 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 `blockNumber`, we end up with an index that is\n // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\n // the same.\n uint256 high = ckpts.length;\n uint256 low = 0;\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n if (ckpts[mid].fromBlock > blockNumber) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n return high == 0 ? 0 : ckpts[high - 1].votes;\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 {DelegateVotesChanged} event.\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) 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 {DelegateChanged} and {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(\n address src,\n address dst,\n uint256 amount\n ) 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 oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\n newWeight = op(oldWeight, delta);\n\n if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\n ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight);\n } else {\n ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)}));\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 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" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ArraysUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\n * total supply at the time are recorded for later access.\n *\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\n * In naive implementations it's possible to perform a \"double spend\" attack by reusing the same balance from different\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\n * used to create an efficient ERC20 forking mechanism.\n *\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\n * and the account address.\n *\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\n *\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\n * alternative consider {ERC20Votes}.\n *\n * ==== Gas Costs\n *\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\n *\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\n * transfers will have normal cost until the next snapshot, and so on.\n */\n\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\n function __ERC20Snapshot_init() internal onlyInitializing {\n }\n\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\n }\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\n\n using ArraysUpgradeable for uint256[];\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\n // Snapshot struct, but that would impede usage of functions that work on an array.\n struct Snapshots {\n uint256[] ids;\n uint256[] values;\n }\n\n mapping(address => Snapshots) private _accountBalanceSnapshots;\n Snapshots private _totalSupplySnapshots;\n\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\n CountersUpgradeable.Counter private _currentSnapshotId;\n\n /**\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\n */\n event Snapshot(uint256 id);\n\n /**\n * @dev Creates a new snapshot and returns its snapshot id.\n *\n * Emits a {Snapshot} event that contains the same id.\n *\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\n *\n * [WARNING]\n * ====\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\n * you must consider that it can potentially be used by attackers in two ways.\n *\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\n * section above.\n *\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\n * ====\n */\n function _snapshot() internal virtual returns (uint256) {\n _currentSnapshotId.increment();\n\n uint256 currentId = _getCurrentSnapshotId();\n emit Snapshot(currentId);\n return currentId;\n }\n\n /**\n * @dev Get the current snapshotId\n */\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\n return _currentSnapshotId.current();\n }\n\n /**\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\n */\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\n\n return snapshotted ? value : balanceOf(account);\n }\n\n /**\n * @dev Retrieves the total supply at the time `snapshotId` was created.\n */\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\n\n return snapshotted ? value : totalSupply();\n }\n\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n if (from == address(0)) {\n // mint\n _updateAccountSnapshot(to);\n _updateTotalSupplySnapshot();\n } else if (to == address(0)) {\n // burn\n _updateAccountSnapshot(from);\n _updateTotalSupplySnapshot();\n } else {\n // transfer\n _updateAccountSnapshot(from);\n _updateAccountSnapshot(to);\n }\n }\n\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\n require(snapshotId > 0, \"ERC20Snapshot: id is 0\");\n require(snapshotId <= _getCurrentSnapshotId(), \"ERC20Snapshot: nonexistent id\");\n\n // When a valid snapshot is queried, there are three possibilities:\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\n // to this id is the current one.\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\n // requested id, and its value is the one to return.\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\n // larger than the requested one.\n //\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\n // exactly this.\n\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\n\n if (index == snapshots.ids.length) {\n return (false, 0);\n } else {\n return (true, snapshots.values[index]);\n }\n }\n\n function _updateAccountSnapshot(address account) private {\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\n }\n\n function _updateTotalSupplySnapshot() private {\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\n }\n\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\n uint256 currentId = _getCurrentSnapshotId();\n if (_lastSnapshotId(snapshots.ids) < currentId) {\n snapshots.ids.push(currentId);\n snapshots.values.push(currentValue);\n }\n }\n\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\n if (ids.length == 0) {\n return 0;\n } else {\n return ids[ids.length - 1];\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 51\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private constant _PERMIT_TYPEHASH =\n keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n /**\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\n * However, to ensure consistency with the upgradeable transpiler, we will continue\n * to reserve a slot.\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\n */\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\n __EIP712_init_unchained(name, \"1\");\n }\n\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. It 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 // 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)`.\n // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.\n // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.\n // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a\n // good first aproximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1;\n uint256 x = a;\n if (x >> 128 > 0) {\n x >>= 128;\n result <<= 64;\n }\n if (x >> 64 > 0) {\n x >>= 64;\n result <<= 32;\n }\n if (x >> 32 > 0) {\n x >>= 32;\n result <<= 16;\n }\n if (x >> 16 > 0) {\n x >>= 16;\n result <<= 8;\n }\n if (x >> 8 > 0) {\n x >>= 8;\n result <<= 4;\n }\n if (x >> 4 > 0) {\n x >>= 4;\n result <<= 2;\n }\n if (x >> 2 > 0) {\n result <<= 1;\n }\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 uint256 result = sqrt(a);\n if (rounding == Rounding.Up && result * result < a) {\n result += 1;\n }\n return result;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.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 the end of a past block (`blockNumber`).\n */\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\n\n /**\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\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 blockNumber) 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(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)\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) {\n require(value >= type(int248).min && value <= type(int248).max, \"SafeCast: value doesn't fit in 248 bits\");\n return int248(value);\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) {\n require(value >= type(int240).min && value <= type(int240).max, \"SafeCast: value doesn't fit in 240 bits\");\n return int240(value);\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) {\n require(value >= type(int232).min && value <= type(int232).max, \"SafeCast: value doesn't fit in 232 bits\");\n return int232(value);\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) {\n require(value >= type(int224).min && value <= type(int224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return int224(value);\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) {\n require(value >= type(int216).min && value <= type(int216).max, \"SafeCast: value doesn't fit in 216 bits\");\n return int216(value);\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) {\n require(value >= type(int208).min && value <= type(int208).max, \"SafeCast: value doesn't fit in 208 bits\");\n return int208(value);\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) {\n require(value >= type(int200).min && value <= type(int200).max, \"SafeCast: value doesn't fit in 200 bits\");\n return int200(value);\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) {\n require(value >= type(int192).min && value <= type(int192).max, \"SafeCast: value doesn't fit in 192 bits\");\n return int192(value);\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) {\n require(value >= type(int184).min && value <= type(int184).max, \"SafeCast: value doesn't fit in 184 bits\");\n return int184(value);\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) {\n require(value >= type(int176).min && value <= type(int176).max, \"SafeCast: value doesn't fit in 176 bits\");\n return int176(value);\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) {\n require(value >= type(int168).min && value <= type(int168).max, \"SafeCast: value doesn't fit in 168 bits\");\n return int168(value);\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) {\n require(value >= type(int160).min && value <= type(int160).max, \"SafeCast: value doesn't fit in 160 bits\");\n return int160(value);\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) {\n require(value >= type(int152).min && value <= type(int152).max, \"SafeCast: value doesn't fit in 152 bits\");\n return int152(value);\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) {\n require(value >= type(int144).min && value <= type(int144).max, \"SafeCast: value doesn't fit in 144 bits\");\n return int144(value);\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) {\n require(value >= type(int136).min && value <= type(int136).max, \"SafeCast: value doesn't fit in 136 bits\");\n return int136(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= type(int128).min && value <= type(int128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\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) {\n require(value >= type(int120).min && value <= type(int120).max, \"SafeCast: value doesn't fit in 120 bits\");\n return int120(value);\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) {\n require(value >= type(int112).min && value <= type(int112).max, \"SafeCast: value doesn't fit in 112 bits\");\n return int112(value);\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) {\n require(value >= type(int104).min && value <= type(int104).max, \"SafeCast: value doesn't fit in 104 bits\");\n return int104(value);\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) {\n require(value >= type(int96).min && value <= type(int96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return int96(value);\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) {\n require(value >= type(int88).min && value <= type(int88).max, \"SafeCast: value doesn't fit in 88 bits\");\n return int88(value);\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) {\n require(value >= type(int80).min && value <= type(int80).max, \"SafeCast: value doesn't fit in 80 bits\");\n return int80(value);\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) {\n require(value >= type(int72).min && value <= type(int72).max, \"SafeCast: value doesn't fit in 72 bits\");\n return int72(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= type(int64).min && value <= type(int64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\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) {\n require(value >= type(int56).min && value <= type(int56).max, \"SafeCast: value doesn't fit in 56 bits\");\n return int56(value);\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) {\n require(value >= type(int48).min && value <= type(int48).max, \"SafeCast: value doesn't fit in 48 bits\");\n return int48(value);\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) {\n require(value >= type(int40).min && value <= type(int40).max, \"SafeCast: value doesn't fit in 40 bits\");\n return int40(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= type(int32).min && value <= type(int32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\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) {\n require(value >= type(int24).min && value <= type(int24).max, \"SafeCast: value doesn't fit in 24 bits\");\n return int24(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= type(int16).min && value <= type(int16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= type(int8).min && value <= type(int8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n *\n * _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" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.3) (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\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 } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC20_init_unchained(name_, symbol_);\n }\n\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n }\n _balances[to] += amount;\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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[45] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHash() internal virtual view returns (bytes32) {\n return _HASHED_NAME;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\n return _HASHED_VERSION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev Collection of functions related to array types.\n */\nlibrary ArraysUpgradeable {\n /**\n * @dev Searches a sorted `array` and returns the first index that contains\n * a value greater or equal to `element`. If no such index exists (i.e. all\n * values in the array are strictly less than `element`), the array length is\n * returned. Time complexity O(log n).\n *\n * `array` is expected to be sorted in ascending order, and to contain no\n * repeated elements.\n */\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\n if (array.length == 0) {\n return 0;\n }\n\n uint256 low = 0;\n uint256 high = array.length;\n\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\n // because Math.average rounds down (it does integer division with truncation).\n if (array[mid] > element) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\n if (low > 0 && array[low - 1] == element) {\n return low - 1;\n } else {\n return low;\n }\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/Guardable.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./BaseGuard.sol\";\n\n/// @title Guardable - A contract that manages fallback calls made to this contract\ncontract Guardable is OwnableUpgradeable {\n address public guard;\n\n event ChangedGuard(address guard);\n\n /// `guard_` does not implement IERC165.\n error NotIERC165Compliant(address guard_);\n\n /// @dev Set a guard that checks transactions before execution.\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\n function setGuard(address _guard) external onlyOwner {\n if (_guard != address(0)) {\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\n revert NotIERC165Compliant(_guard);\n }\n guard = _guard;\n emit ChangedGuard(guard);\n }\n\n function getGuard() external view returns (address _guard) {\n return guard;\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IGuard.sol\";\n\nabstract contract BaseGuard is IERC165 {\n function supportsInterface(bytes4 interfaceId)\n external\n pure\n override\n returns (bool)\n {\n return\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\n }\n\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external virtual;\n\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\n}\n" + }, + "contracts/interfaces/IFractalModule.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\r\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\r\n\r\ninterface IFractalModule {\r\n event ControllersAdded(address[] controllers);\r\n event ControllersRemoved(address[] controllers);\r\n\r\n /// @notice Allows an authorized user to exec a Gnosis Safe tx via the module\r\n /// @param execTxData Data payload of module transaction.\r\n function execTx(bytes memory execTxData) external;\r\n\r\n /// @notice Allows the module owner to add users which may exectxs\r\n /// @param _controllers Addresses added to the contoller list\r\n function addControllers(address[] memory _controllers) external;\r\n\r\n /// @notice Allows the module owner to remove users which may exectxs\r\n /// @param _controllers Addresses removed to the contoller list\r\n function removeControllers(address[] memory _controllers) external;\r\n}\r\n" + }, + "contracts/FractalModule.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/zodiac/contracts/core/Module.sol\";\r\nimport \"./interfaces/IFractalModule.sol\";\r\n\r\ncontract FractalModule is IFractalModule, Module {\r\n mapping(address => bool) public controllers; // A DAO may authorize users to act on the behalf of the parent DAO.\r\n\r\n /// @dev Throws if called by any account other than the owner.\r\n modifier onlyAuthorized() {\r\n require(\r\n owner() == msg.sender || controllers[msg.sender],\r\n \"Not Authorized\"\r\n );\r\n _;\r\n }\r\n\r\n /// @dev Initialize function\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n __Ownable_init();\r\n (\r\n address _owner, // Controlling DAO\r\n address _avatar,\r\n address _target, \r\n address[] memory _controllers // Authorized controllers\r\n ) = abi.decode(\r\n initializeParams,\r\n (address, address, address, address[])\r\n );\r\n\r\n setAvatar(_avatar);\r\n setTarget(_target);\r\n addControllers(_controllers);\r\n transferOwnership(_owner);\r\n }\r\n\r\n /// @notice Allows an authorized user to exec a Gnosis Safe tx via the module\r\n /// @param execTxData Data payload of module transaction.\r\n function execTx(bytes memory execTxData) public onlyAuthorized {\r\n (\r\n address _target,\r\n uint256 _value,\r\n bytes memory _data,\r\n Enum.Operation _operation\r\n ) = abi.decode(execTxData, (address, uint256, bytes, Enum.Operation));\r\n require(\r\n exec(_target, _value, _data, _operation),\r\n \"Module transaction failed\"\r\n );\r\n }\r\n\r\n /// @notice Allows the module owner to add users which may exectxs\r\n /// @param _controllers Addresses added to the contoller list\r\n function addControllers(address[] memory _controllers) public onlyOwner {\r\n uint256 controllersLength = _controllers.length;\r\n for (uint256 i; i < controllersLength; ) {\r\n controllers[_controllers[i]] = true;\r\n unchecked {\r\n ++i;\r\n }\r\n }\r\n emit ControllersAdded(_controllers);\r\n }\r\n\r\n /// @notice Allows the module owner to remove users which may exectxs\r\n /// @param _controllers Addresses removed to the contoller list\r\n function removeControllers(address[] memory _controllers)\r\n external\r\n onlyOwner\r\n {\r\n uint256 controllersLength = _controllers.length;\r\n for (uint256 i; i < controllersLength; ) {\r\n controllers[_controllers[i]] = false;\r\n unchecked {\r\n ++i;\r\n }\r\n }\r\n emit ControllersRemoved(_controllers);\r\n }\r\n\r\n /// @notice Returns whether a given interface ID is supported\r\n /// @param interfaceId An interface ID bytes4 as defined by ERC-165\r\n /// @return bool Indicates whether the interface is supported\r\n function supportsInterface(bytes4 interfaceId)\r\n external\r\n pure\r\n returns (bool)\r\n {\r\n return\r\n interfaceId == type(IFractalModule).interfaceId || // 0xe6d7a83a\r\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\r\n }\r\n}\r\n" + }, + "@gnosis.pm/zodiac/contracts/core/Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/IAvatar.sol\";\nimport \"../factory/FactoryFriendly.sol\";\nimport \"../guard/Guardable.sol\";\n\nabstract contract Module is FactoryFriendly, Guardable {\n /// @dev Address that will ultimately execute function calls.\n address public avatar;\n /// @dev Address that this module will pass transactions to.\n address public target;\n\n /// @dev Emitted each time the avatar is set.\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n /// @dev Emitted each time the Target is set.\n event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\n /// @notice Can only be called by the current owner.\n function setAvatar(address _avatar) public onlyOwner {\n address previousAvatar = avatar;\n avatar = _avatar;\n emit AvatarSet(previousAvatar, _avatar);\n }\n\n /// @dev Sets the target to a new target (`newTarget`).\n /// @notice Can only be called by the current owner.\n function setTarget(address _target) public onlyOwner {\n address previousTarget = target;\n target = _target;\n emit TargetSet(previousTarget, _target);\n }\n\n /// @dev Passes a transaction to be executed by the avatar.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success) {\n /// Check if a transactioon guard is enabled.\n if (guard != address(0)) {\n IGuard(guard).checkTransaction(\n /// Transaction info used by module transactions.\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n bytes(\"0x\"),\n msg.sender\n );\n }\n success = IAvatar(target).execTransactionFromModule(\n to,\n value,\n data,\n operation\n );\n if (guard != address(0)) {\n IGuard(guard).checkAfterExecution(bytes32(\"0x\"), success);\n }\n return success;\n }\n\n /// @dev Passes a transaction to be executed by the target and returns data.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execAndReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success, bytes memory returnData) {\n /// Check if a transactioon guard is enabled.\n if (guard != address(0)) {\n IGuard(guard).checkTransaction(\n /// Transaction info used by module transactions.\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n bytes(\"0x\"),\n msg.sender\n );\n }\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(to, value, data, operation);\n if (guard != address(0)) {\n IGuard(guard).checkAfterExecution(bytes32(\"0x\"), success);\n }\n return (success, returnData);\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n /// @dev Enables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Modules should be stored as a linked list.\n /// @notice Must emit EnabledModule(address module) if successful.\n /// @param module Module to be enabled.\n function enableModule(address module) external;\n\n /// @dev Disables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Must emit DisabledModule(address module) if successful.\n /// @param prevModule Address that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) external;\n\n /// @dev Allows a Module to execute a transaction.\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success);\n\n /// @dev Allows a Module to execute a transaction and return data\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success, bytes memory returnData);\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) external view returns (bool);\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next);\n}\n" + }, + "contracts/TokenClaim.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/ITokenClaim.sol\";\r\nimport \"./VotesToken.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\r\n\r\ncontract TokenClaim is FactoryFriendly, ITokenClaim {\r\n using SafeERC20 for IERC20;\r\n\r\n address public childToken;\r\n address public parentToken;\r\n uint256 public snapShotId;\r\n uint256 public parentAllocation;\r\n mapping(address => bool) public claimed;\r\n\r\n /// @notice Initialize function, will be triggered when a new proxy is deployed\r\n /// @param initializeParams Parameters of initialization encoded\r\n function setUp(bytes memory initializeParams) public override initializer {\r\n __Ownable_init();\r\n (\r\n address _childTokenFunder,\r\n address _parentToken,\r\n address _childToken,\r\n uint256 _parentAllocation\r\n ) = abi.decode(initializeParams, (address, address, address, uint256));\r\n\r\n childToken = _childToken;\r\n parentToken = _parentToken;\r\n parentAllocation = _parentAllocation;\r\n\r\n snapShotId = VotesToken(_parentToken).captureSnapShot();\r\n\r\n IERC20(_childToken).transferFrom(_childTokenFunder, address(this), _parentAllocation);\r\n\r\n emit TokenClaimCreated(_parentToken, _childToken, _parentAllocation, snapShotId);\r\n }\r\n\r\n /// @notice This function allows pToken holders to claim cTokens\r\n /// @param claimer Address which is being claimed for\r\n function claimToken(address claimer) external {\r\n uint256 amount = getClaimAmount(claimer); // Get user balance\r\n\r\n if (amount == 0) revert NoAllocation();\r\n\r\n claimed[claimer] = true;\r\n\r\n IERC20(childToken).safeTransfer(claimer, amount); // transfer user balance\r\n\r\n emit TokenClaimed(parentToken, childToken, claimer, amount);\r\n }\r\n\r\n /// @notice Gets a users child token claimable amount\r\n /// @param claimer Address which is being claimed for\r\n /// @return cTokenAllocation Users cToken allocation\r\n function getClaimAmount(address claimer)\r\n public\r\n view\r\n returns (uint256)\r\n {\r\n return claimed[claimer] ? 0 :\r\n (VotesToken(parentToken).balanceOfAt(claimer, snapShotId) * parentAllocation) /\r\n VotesToken(parentToken).totalSupplyAt(snapShotId);\r\n }\r\n}\r\n" + }, + "contracts/interfaces/ITokenClaim.sol": { + "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\ninterface ITokenClaim {\r\n error NoAllocation();\r\n error AllocationClaimed();\r\n event TokenClaimCreated(\r\n address parentToken,\r\n address childToken,\r\n uint256 parentAllocation,\r\n uint256 snapshotId\r\n );\r\n event TokenClaimed(\r\n address indexed pToken,\r\n address indexed cToken,\r\n address indexed claimer,\r\n uint256 amount\r\n );\r\n\r\n /// @notice This function allows pToken holders to claim cTokens\r\n /// @param claimer Address which is being claimed for\r\n function claimToken(address claimer) external;\r\n\r\n /// @notice Gets a users child token claimable amount\r\n /// @param claimer Address which is being claimed for\r\n /// @return cTokenAllocation Users cToken allocation\r\n function getClaimAmount(address claimer) external view returns (uint256);\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/draft-IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) 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(\n IERC20 token,\n address spender,\n uint256 value\n ) 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 function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n function safePermit(\n IERC20Permit 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(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @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}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\n\ninterface Guard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract GuardManager is SelfAuthorized {\n event ChangedGuard(address guard);\n // keccak256(\"guard_manager.guard.address\")\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\n\n /// @dev Set a guard that checks transactions before execution\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\n function setGuard(address guard) external authorized {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, guard)\n }\n emit ChangedGuard(guard);\n }\n\n function getGuard() internal view returns (address guard) {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n guard := sload(slot)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SelfAuthorized - authorizes current contract to perform actions\n/// @author Richard Meissner - \ncontract SelfAuthorized {\n function requireSelfCall() private view {\n require(msg.sender == address(this), \"GS031\");\n }\n\n modifier authorized() {\n // This is a function call as it minimized the bytecode size\n requireSelfCall();\n _;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract FallbackManager is SelfAuthorized {\n event ChangedFallbackHandler(address handler);\n\n // keccak256(\"fallback_manager.handler.address\")\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\n\n function internalSetFallbackHandler(address handler) internal {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, handler)\n }\n }\n\n /// @dev Allows to add a contract to handle fallback calls.\n /// Only fallback calls without value and with data will be forwarded.\n /// This can only be done via a Safe transaction.\n /// @param handler contract to handle fallbacks calls.\n function setFallbackHandler(address handler) public authorized {\n internalSetFallbackHandler(handler);\n emit ChangedFallbackHandler(handler);\n }\n\n // solhint-disable-next-line payable-fallback,no-complex-fallback\n fallback() external {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let handler := sload(slot)\n if iszero(handler) {\n return(0, 0)\n }\n calldatacopy(0, 0, calldatasize())\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n mstore(calldatasize(), shl(96, caller()))\n // Add 20 bytes for the address appended add the end\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if iszero(success) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./base/ModuleManager.sol\";\nimport \"./base/OwnerManager.sol\";\nimport \"./base/FallbackManager.sol\";\nimport \"./base/GuardManager.sol\";\nimport \"./common/EtherPaymentFallback.sol\";\nimport \"./common/Singleton.sol\";\nimport \"./common/SignatureDecoder.sol\";\nimport \"./common/SecuredTokenTransfer.sol\";\nimport \"./common/StorageAccessible.sol\";\nimport \"./interfaces/ISignatureValidator.sol\";\nimport \"./external/GnosisSafeMath.sol\";\n\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafe is\n EtherPaymentFallback,\n Singleton,\n ModuleManager,\n OwnerManager,\n SignatureDecoder,\n SecuredTokenTransfer,\n ISignatureValidatorConstants,\n FallbackManager,\n StorageAccessible,\n GuardManager\n{\n using GnosisSafeMath for uint256;\n\n string public constant VERSION = \"1.3.0\";\n\n // keccak256(\n // \"EIP712Domain(uint256 chainId,address verifyingContract)\"\n // );\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\n\n // keccak256(\n // \"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\"\n // );\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\n\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\n event SignMsg(bytes32 indexed msgHash);\n event ExecutionFailure(bytes32 txHash, uint256 payment);\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\n\n uint256 public nonce;\n bytes32 private _deprecatedDomainSeparator;\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\n mapping(bytes32 => uint256) public signedMessages;\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\n\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\n constructor() {\n // By setting the threshold it is not possible to call setup anymore,\n // so we create a Safe with 0 owners and threshold 1.\n // This is an unusable Safe, perfect for the singleton\n threshold = 1;\n }\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n /// @param to Contract address for optional delegate call.\n /// @param data Data payload for optional delegate call.\n /// @param fallbackHandler Handler for fallback calls to this contract\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\n /// @param payment Value that should be paid\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\n function setup(\n address[] calldata _owners,\n uint256 _threshold,\n address to,\n bytes calldata data,\n address fallbackHandler,\n address paymentToken,\n uint256 payment,\n address payable paymentReceiver\n ) external {\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\n setupOwners(_owners, _threshold);\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\n setupModules(to, data);\n\n if (payment > 0) {\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\n }\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\n }\n\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\n /// Note: The fees are always transferred, even if the user transaction fails.\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @param safeTxGas Gas that should be used for the Safe transaction.\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Gas price that should be used for the payment calculation.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\n function execTransaction(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures\n ) public payable virtual returns (bool success) {\n bytes32 txHash;\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n bytes memory txHashData =\n encodeTransactionData(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n nonce\n );\n // Increase nonce and execute transaction.\n nonce++;\n txHash = keccak256(txHashData);\n checkSignatures(txHash, txHashData, signatures);\n }\n address guard = getGuard();\n {\n if (guard != address(0)) {\n Guard(guard).checkTransaction(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n signatures,\n msg.sender\n );\n }\n }\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \"GS010\");\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n uint256 gasUsed = gasleft();\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\n gasUsed = gasUsed.sub(gasleft());\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\n require(success || safeTxGas != 0 || gasPrice != 0, \"GS013\");\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\n uint256 payment = 0;\n if (gasPrice > 0) {\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\n }\n if (success) emit ExecutionSuccess(txHash, payment);\n else emit ExecutionFailure(txHash, payment);\n }\n {\n if (guard != address(0)) {\n Guard(guard).checkAfterExecution(txHash, success);\n }\n }\n }\n\n function handlePayment(\n uint256 gasUsed,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver\n ) private returns (uint256 payment) {\n // solhint-disable-next-line avoid-tx-origin\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\n if (gasToken == address(0)) {\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\n require(receiver.send(payment), \"GS011\");\n } else {\n payment = gasUsed.add(baseGas).mul(gasPrice);\n require(transferToken(gasToken, receiver, payment), \"GS012\");\n }\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n */\n function checkSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures\n ) public view {\n // Load threshold to avoid multiple storage loads\n uint256 _threshold = threshold;\n // Check that a threshold is set\n require(_threshold > 0, \"GS001\");\n checkNSignatures(dataHash, data, signatures, _threshold);\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n * @param requiredSignatures Amount of required valid signatures.\n */\n function checkNSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures,\n uint256 requiredSignatures\n ) public view {\n // Check that the provided signature data is not too short\n require(signatures.length >= requiredSignatures.mul(65), \"GS020\");\n // There cannot be an owner with address 0.\n address lastOwner = address(0);\n address currentOwner;\n uint8 v;\n bytes32 r;\n bytes32 s;\n uint256 i;\n for (i = 0; i < requiredSignatures; i++) {\n (v, r, s) = signatureSplit(signatures, i);\n if (v == 0) {\n // If v is 0 then it is a contract signature\n // When handling contract signatures the address of the contract is encoded into r\n currentOwner = address(uint160(uint256(r)));\n\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\n // Here we only check that the pointer is not pointing inside the part that is being processed\n require(uint256(s) >= requiredSignatures.mul(65), \"GS021\");\n\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\n require(uint256(s).add(32) <= signatures.length, \"GS022\");\n\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\n uint256 contractSignatureLen;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\n }\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \"GS023\");\n\n // Check signature\n bytes memory contractSignature;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\n contractSignature := add(add(signatures, s), 0x20)\n }\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \"GS024\");\n } else if (v == 1) {\n // If v is 1 then it is an approved hash\n // When handling approved hashes the address of the approver is encoded into r\n currentOwner = address(uint160(uint256(r)));\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \"GS025\");\n } else if (v > 30) {\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\n currentOwner = ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", dataHash)), v - 4, r, s);\n } else {\n // Default is the ecrecover flow with the provided data hash\n // Use ecrecover with the messageHash for EOA signatures\n currentOwner = ecrecover(dataHash, v, r, s);\n }\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \"GS026\");\n lastOwner = currentOwner;\n }\n }\n\n /// @dev Allows to estimate a Safe transaction.\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\n function requiredTxGas(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation\n ) external returns (uint256) {\n uint256 startGas = gasleft();\n // We don't provide an error message here, as we use it to return the estimate\n require(execute(to, value, data, operation, gasleft()));\n uint256 requiredGas = startGas - gasleft();\n // Convert response to string and return via error message\n revert(string(abi.encodePacked(requiredGas)));\n }\n\n /**\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\n */\n function approveHash(bytes32 hashToApprove) external {\n require(owners[msg.sender] != address(0), \"GS030\");\n approvedHashes[msg.sender][hashToApprove] = 1;\n emit ApproveHash(hashToApprove, msg.sender);\n }\n\n /// @dev Returns the chain id used by this contract.\n function getChainId() public view returns (uint256) {\n uint256 id;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n id := chainid()\n }\n return id;\n }\n\n function domainSeparator() public view returns (bytes32) {\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\n }\n\n /// @dev Returns the bytes that are hashed to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Gas that should be used for the safe transaction.\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash bytes.\n function encodeTransactionData(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes memory) {\n bytes32 safeTxHash =\n keccak256(\n abi.encode(\n SAFE_TX_TYPEHASH,\n to,\n value,\n keccak256(data),\n operation,\n safeTxGas,\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n _nonce\n )\n );\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\n }\n\n /// @dev Returns hash to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Fas that should be used for the safe transaction.\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash.\n function getTransactionHash(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes32) {\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\nimport \"./Executor.sol\";\n\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract ModuleManager is SelfAuthorized, Executor {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n address internal constant SENTINEL_MODULES = address(0x1);\n\n mapping(address => address) internal modules;\n\n function setupModules(address to, bytes memory data) internal {\n require(modules[SENTINEL_MODULES] == address(0), \"GS100\");\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\n if (to != address(0))\n // Setup has to complete successfully or transaction fails.\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \"GS000\");\n }\n\n /// @dev Allows to add a module to the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Enables the module `module` for the Safe.\n /// @param module Module to be whitelisted.\n function enableModule(address module) public authorized {\n // Module address cannot be null or sentinel.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n // Module cannot be added twice.\n require(modules[module] == address(0), \"GS102\");\n modules[module] = modules[SENTINEL_MODULES];\n modules[SENTINEL_MODULES] = module;\n emit EnabledModule(module);\n }\n\n /// @dev Allows to remove a module from the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Disables the module `module` for the Safe.\n /// @param prevModule Module that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) public authorized {\n // Validate module address and check that it corresponds to module index.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n require(modules[prevModule] == module, \"GS103\");\n modules[prevModule] = modules[module];\n modules[module] = address(0);\n emit DisabledModule(module);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public virtual returns (bool success) {\n // Only whitelisted modules are allowed.\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \"GS104\");\n // Execute transaction without further confirmations.\n success = execute(to, value, data, operation, gasleft());\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\n else emit ExecutionFromModuleFailure(msg.sender);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public returns (bool success, bytes memory returnData) {\n success = execTransactionFromModule(to, value, data, operation);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // Load free memory location\n let ptr := mload(0x40)\n // We allocate memory for the return data by setting the free memory location to\n // current free memory location + data size + 32 bytes for data size value\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\n // Store the size\n mstore(ptr, returndatasize())\n // Store the data\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\n // Point the return data to the correct memory location\n returnData := ptr\n }\n }\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) public view returns (bool) {\n return SENTINEL_MODULES != module && modules[module] != address(0);\n }\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 moduleCount = 0;\n address currentModule = modules[start];\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\n array[moduleCount] = currentModule;\n currentModule = modules[currentModule];\n moduleCount++;\n }\n next = currentModule;\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(array, moduleCount)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract OwnerManager is SelfAuthorized {\n event AddedOwner(address owner);\n event RemovedOwner(address owner);\n event ChangedThreshold(uint256 threshold);\n\n address internal constant SENTINEL_OWNERS = address(0x1);\n\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\n // Threshold can only be 0 at initialization.\n // Check ensures that setup function can only be called once.\n require(threshold == 0, \"GS200\");\n // Validate that threshold is smaller than number of added owners.\n require(_threshold <= _owners.length, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n // Initializing Safe owners.\n address currentOwner = SENTINEL_OWNERS;\n for (uint256 i = 0; i < _owners.length; i++) {\n // Owner address cannot be null.\n address owner = _owners[i];\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[currentOwner] = owner;\n currentOwner = owner;\n }\n owners[currentOwner] = SENTINEL_OWNERS;\n ownerCount = _owners.length;\n threshold = _threshold;\n }\n\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\n /// @param owner New owner address.\n /// @param _threshold New threshold.\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[owner] = owners[SENTINEL_OWNERS];\n owners[SENTINEL_OWNERS] = owner;\n ownerCount++;\n emit AddedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\n /// @param owner Owner address to be removed.\n /// @param _threshold New threshold.\n function removeOwner(\n address prevOwner,\n address owner,\n uint256 _threshold\n ) public authorized {\n // Only allow to remove an owner, if threshold can still be reached.\n require(ownerCount - 1 >= _threshold, \"GS201\");\n // Validate owner address and check that it corresponds to owner index.\n require(owner != address(0) && owner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == owner, \"GS205\");\n owners[prevOwner] = owners[owner];\n owners[owner] = address(0);\n ownerCount--;\n emit RemovedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to swap/replace an owner from the Safe with another address.\n /// This can only be done via a Safe transaction.\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\n /// @param oldOwner Owner address to be replaced.\n /// @param newOwner New owner address.\n function swapOwner(\n address prevOwner,\n address oldOwner,\n address newOwner\n ) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[newOwner] == address(0), \"GS204\");\n // Validate oldOwner address and check that it corresponds to owner index.\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == oldOwner, \"GS205\");\n owners[newOwner] = owners[oldOwner];\n owners[prevOwner] = newOwner;\n owners[oldOwner] = address(0);\n emit RemovedOwner(oldOwner);\n emit AddedOwner(newOwner);\n }\n\n /// @dev Allows to update the number of required confirmations by Safe owners.\n /// This can only be done via a Safe transaction.\n /// @notice Changes the threshold of the Safe to `_threshold`.\n /// @param _threshold New threshold.\n function changeThreshold(uint256 _threshold) public authorized {\n // Validate that threshold is smaller than number of owners.\n require(_threshold <= ownerCount, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n threshold = _threshold;\n emit ChangedThreshold(threshold);\n }\n\n function getThreshold() public view returns (uint256) {\n return threshold;\n }\n\n function isOwner(address owner) public view returns (bool) {\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\n }\n\n /// @dev Returns array of owners.\n /// @return Array of Safe owners.\n function getOwners() public view returns (address[] memory) {\n address[] memory array = new address[](ownerCount);\n\n // populate return array\n uint256 index = 0;\n address currentOwner = owners[SENTINEL_OWNERS];\n while (currentOwner != SENTINEL_OWNERS) {\n array[index] = currentOwner;\n currentOwner = owners[currentOwner];\n index++;\n }\n return array;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\n/// @author Richard Meissner - \ncontract EtherPaymentFallback {\n event SafeReceived(address indexed sender, uint256 value);\n\n /// @dev Fallback function accepts Ether transactions.\n receive() external payable {\n emit SafeReceived(msg.sender, msg.value);\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Singleton.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\n/// @author Richard Meissner - \ncontract Singleton {\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\n // It should also always be ensured that the address is stored alone (uses a full word)\n address private singleton;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\n/// @author Richard Meissner - \ncontract SignatureDecoder {\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\n /// @param signatures concatenated rsv signatures\n function signatureSplit(bytes memory signatures, uint256 pos)\n internal\n pure\n returns (\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n {\n // The signature format is a compact form of:\n // {bytes32 r}{bytes32 s}{uint8 v}\n // Compact means, uint8 is not padded to 32 bytes.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n // Here we are loading the last 32 bytes, including 31 bytes\n // of 's'. There is no 'mload8' to do this.\n //\n // 'byte' is not working due to the Solidity parser, so lets\n // use the second best option, 'and'\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SecuredTokenTransfer - Secure token transfer\n/// @author Richard Meissner - \ncontract SecuredTokenTransfer {\n /// @dev Transfers a token and returns if it was a success\n /// @param token Token that should be transferred\n /// @param receiver Receiver to whom the token should be transferred\n /// @param amount The amount of tokens that should be transferred\n function transferToken(\n address token,\n address receiver,\n uint256 amount\n ) internal returns (bool transferred) {\n // 0xa9059cbb - keccack(\"transfer(address,uint256)\")\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // We write the return value to scratch space.\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n switch returndatasize()\n case 0 {\n transferred := success\n }\n case 0x20 {\n transferred := iszero(or(iszero(success), iszero(mload(0))))\n }\n default {\n transferred := 0\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\ncontract StorageAccessible {\n /**\n * @dev Reads `length` bytes of storage in the currents contract\n * @param offset - the offset in the current contract's storage in words to start reading from\n * @param length - the number of words (32 bytes) of data to read\n * @return the bytes that were read.\n */\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\n bytes memory result = new bytes(length * 32);\n for (uint256 index = 0; index < length; index++) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let word := sload(add(offset, index))\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\n }\n }\n return result;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static).\n *\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\n * Specifically, the `returndata` after a call to this method will be:\n * `success:bool || response.length:uint256 || response:bytes`.\n *\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\n\n mstore(0x00, success)\n mstore(0x20, returndatasize())\n returndatacopy(0x40, 0, returndatasize())\n revert(0, add(returndatasize(), 0x40))\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ncontract ISignatureValidatorConstants {\n // bytes4(keccak256(\"isValidSignature(bytes,bytes)\")\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\n}\n\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param _data Arbitrary length data signed on the behalf of address(this)\n * @param _signature Signature byte array associated with _data\n *\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\n * MUST allow external calls\n */\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title GnosisSafeMath\n * @dev Math operations with safety checks that revert on error\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\n * TODO: remove once open zeppelin update to solc 0.5.0\n */\nlibrary GnosisSafeMath {\n /**\n * @dev Multiplies two numbers, reverts on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b);\n\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Adds two numbers, reverts on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a);\n\n return c;\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/Executor.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\n\n/// @title Executor - A contract that can execute transactions\n/// @author Richard Meissner - \ncontract Executor {\n function execute(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 txGas\n ) internal returns (bool success) {\n if (operation == Enum.Operation.DelegateCall) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n } else {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n }\n}\n" + }, + "contracts/hardhat-dependency-compiler/@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >0.0.0;\nimport '@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol';\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/goerli/solcInputs/e732611ec04617ba20476cba834fc2b4.json b/deployments/goerli/solcInputs/e732611ec04617ba20476cba834fc2b4.json deleted file mode 100644 index 3894a1aa..00000000 --- a/deployments/goerli/solcInputs/e732611ec04617ba20476cba834fc2b4.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/CallbackGnosis.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./interfaces/ICallbackGnosis.sol\";\r\n\r\n/// @notice Operated via the GnosisFactory's createProxyWithCallback method\r\n/// @notice Purpose - Setup Gnosis Safe w/ any arb method calls\r\ncontract CallbackGnosis is ICallbackGnosis {\r\n /// @dev Method called once a proxy contract is created\r\n /// @param proxy GnosisSafe address\r\n /// @param initializer Payload used to setup GnosisSafe Configuration \r\n function proxyCreated(\r\n GnosisSafeProxy proxy,\r\n address,\r\n bytes calldata initializer,\r\n uint256\r\n ) external {\r\n (bytes memory txData, bytes memory signature) = abi.decode(\r\n initializer,\r\n (bytes, bytes)\r\n );\r\n\r\n (\r\n address[][] memory targets,\r\n bytes[][] memory txs,\r\n bool[] memory gnosisExecTxs\r\n ) = abi.decode(txData, (address[][], bytes[][], bool[]));\r\n\r\n for (uint256 i; i < targets.length; i++) {\r\n if (gnosisExecTxs[i]) {\r\n gnosisExecTx(targets[i], txs[i], address(proxy), signature);\r\n } else {\r\n multiTx(targets[i], txs[i], address(proxy));\r\n }\r\n }\r\n }\r\n\r\n /// @notice Allows Gnosis Safe txs without knowledge of the Gnosis address\r\n /// @dev Utilized to bypass the txGuard / Sig Requirement \r\n /// @param _targets Contract Address / Address(0) == proxy\r\n /// @param _txs Target payload\r\n /// @param _proxy GnosisSafe Address\r\n function multiTx(\r\n address[] memory _targets,\r\n bytes[] memory _txs,\r\n address _proxy\r\n ) public {\r\n for (uint256 i; i < _targets.length; i++) {\r\n (bool success, ) = address(_targets[i] == address(0) ? _proxy : _targets[i]).call(_txs[i]);\r\n require(success, \"CB001\");\r\n }\r\n }\r\n\r\n /// @notice Executes a tx within the context of the Gnosis Safe\r\n /// @dev msg.sender == GnosisSafe Address\r\n /// @param _targets Contract Address / Address(0) == proxy\r\n /// @param _txs Target payload\r\n /// @param _proxy GnosisSafe Address\r\n /// @param _signature Signatures req. to execTransaction => Gnosis Safe\r\n function gnosisExecTx(address[] memory _targets, bytes[] memory _txs, address _proxy, bytes memory _signature) internal {\r\n (bool success, ) = address(_proxy).call(\r\n abi.encodeWithSignature(\r\n \"execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)\",\r\n address(this), // multisend address\r\n 0,\r\n abi.encodeWithSignature(\r\n \"multiTx(address[],bytes[],address)\",\r\n _targets,\r\n _txs,\r\n _proxy\r\n ), // data\r\n 1,\r\n 0,\r\n 0,\r\n 0,\r\n address(0),\r\n payable(0),\r\n _signature\r\n )\r\n );\r\n require(success, \"CB000\");\r\n }\r\n}\r\n" - }, - "contracts/interfaces/ICallbackGnosis.sol": { - "content": "//SPDX-License-Identifier: Unlicense\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol\";\r\n\r\ninterface ICallbackGnosis is IProxyCreationCallback {\r\n /// @notice Allows Gnosis Safe txs without knowledge of the Gnosis address\r\n /// @dev Utilized to bypass the txGuard / Sig Requirement\r\n /// @param _targets Contract Address / Address(0) == proxy\r\n /// @param _txs Target payload\r\n /// @param _proxy GnosisSafe Address\r\n function multiTx(\r\n address[] memory _targets,\r\n bytes[] memory _txs,\r\n address _proxy\r\n ) external;\r\n}\r\n" - }, - "@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"./GnosisSafeProxy.sol\";\n\ninterface IProxyCreationCallback {\n function proxyCreated(\n GnosisSafeProxy proxy,\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external;\n}\n" - }, - "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol": { - "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\n/// @author Richard Meissner - \ninterface IProxy {\n function masterCopy() external view returns (address);\n}\n\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafeProxy {\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\n address internal singleton;\n\n /// @dev Constructor function sets address of singleton contract.\n /// @param _singleton Singleton address.\n constructor(address _singleton) {\n require(_singleton != address(0), \"Invalid singleton address provided\");\n singleton = _singleton;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n fallback() external payable {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n // 0xa619486e == keccak(\"masterCopy()\"). The value is right padded to 32-bytes with 0s\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\n mstore(0, _singleton)\n return(0, 0x20)\n }\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "storageLayout", - "devdoc", - "userdoc", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file