From 58e6ee22aae186455bef019f69f5696a34044d73 Mon Sep 17 00:00:00 2001 From: Adam Gall Date: Wed, 6 Nov 2024 12:52:38 -0500 Subject: [PATCH 1/2] Deploy HatsProposals contracts to all networks --- ...arERC20VotingWithHatsProposalCreation.json | 1334 +++++++++++++++ ...rERC721VotingWithHatsProposalCreation.json | 1440 ++++++++++++++++ .../af493beb8ac3dcaf17411aefc1e2bf83.json | 107 ++ ...arERC20VotingWithHatsProposalCreation.json | 1334 +++++++++++++++ ...rERC721VotingWithHatsProposalCreation.json | 1440 ++++++++++++++++ .../af493beb8ac3dcaf17411aefc1e2bf83.json | 107 ++ ...arERC20VotingWithHatsProposalCreation.json | 1334 +++++++++++++++ ...rERC721VotingWithHatsProposalCreation.json | 1440 ++++++++++++++++ .../af493beb8ac3dcaf17411aefc1e2bf83.json | 107 ++ ...arERC20VotingWithHatsProposalCreation.json | 1349 +++++++++++++++ ...rERC721VotingWithHatsProposalCreation.json | 1455 +++++++++++++++++ .../af493beb8ac3dcaf17411aefc1e2bf83.json | 107 ++ ...arERC20VotingWithHatsProposalCreation.json | 1334 +++++++++++++++ ...rERC721VotingWithHatsProposalCreation.json | 1440 ++++++++++++++++ .../af493beb8ac3dcaf17411aefc1e2bf83.json | 107 ++ 15 files changed, 14435 insertions(+) create mode 100644 deployments/base/LinearERC20VotingWithHatsProposalCreation.json create mode 100644 deployments/base/LinearERC721VotingWithHatsProposalCreation.json create mode 100644 deployments/base/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json create mode 100644 deployments/mainnet/LinearERC20VotingWithHatsProposalCreation.json create mode 100644 deployments/mainnet/LinearERC721VotingWithHatsProposalCreation.json create mode 100644 deployments/mainnet/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json create mode 100644 deployments/optimism/LinearERC20VotingWithHatsProposalCreation.json create mode 100644 deployments/optimism/LinearERC721VotingWithHatsProposalCreation.json create mode 100644 deployments/optimism/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json create mode 100644 deployments/polygon/LinearERC20VotingWithHatsProposalCreation.json create mode 100644 deployments/polygon/LinearERC721VotingWithHatsProposalCreation.json create mode 100644 deployments/polygon/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json create mode 100644 deployments/sepolia/LinearERC20VotingWithHatsProposalCreation.json create mode 100644 deployments/sepolia/LinearERC721VotingWithHatsProposalCreation.json create mode 100644 deployments/sepolia/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json diff --git a/deployments/base/LinearERC20VotingWithHatsProposalCreation.json b/deployments/base/LinearERC20VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..eb78746 --- /dev/null +++ b/deployments/base/LinearERC20VotingWithHatsProposalCreation.json @@ -0,0 +1,1334 @@ +{ + "address": "0x97D15b915D33e5b642d42b565644cF43F285e61C", + "abi": [ + { + "inputs": [], + "name": "AlreadyVoted", + "type": "error" + }, + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidQuorumNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "requiredProposerWeight", + "type": "uint256" + } + ], + "name": "RequiredProposerWeightUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QUORUM_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votingSupply", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_voter", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getVotingWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governanceToken", + "outputs": [ + { + "internalType": "contract IVotes", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_abstainVotes", + "type": "uint256" + } + ], + "name": "meetsQuorum", + "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": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredProposerWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requiredProposerWeight", + "type": "uint256" + } + ], + "name": "updateRequiredProposerWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x83656c58618b32c15371cce9d3b775aff0ea2f9925f0c730aab65a0de63ac988", + "receipt": { + "to": null, + "from": "0xb5Ca125166C1987A35EDD550E16846Fa1e1D9bB3", + "contractAddress": "0x97D15b915D33e5b642d42b565644cF43F285e61C", + "transactionIndex": 139, + "gasUsed": "1593488", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000", + "blockHash": "0xa715958af00974744b00b08c23686083e8f43009c4ff311d69627007e973d942", + "transactionHash": "0x83656c58618b32c15371cce9d3b775aff0ea2f9925f0c730aab65a0de63ac988", + "logs": [ + { + "transactionIndex": 139, + "blockNumber": 22062704, + "transactionHash": "0x83656c58618b32c15371cce9d3b775aff0ea2f9925f0c730aab65a0de63ac988", + "address": "0x97D15b915D33e5b642d42b565644cF43F285e61C", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 348, + "blockHash": "0xa715958af00974744b00b08c23686083e8f43009c4ff311d69627007e973d942" + } + ], + "blockNumber": 22062704, + "cumulativeGasUsed": "24411716", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyVoted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidQuorumNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"QuorumNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"RequiredProposerWeightUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"QUORUM_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votingSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getVotingWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceToken\",\"outputs\":[{\"internalType\":\"contract IVotes\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_abstainVotes\",\"type\":\"uint256\"}],\"name\":\"meetsQuorum\",\"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\":\"quorumNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"quorumVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredProposerWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"updateQuorumNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"updateRequiredProposerWeight\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getProposalVotingSupply(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"_0\":\"uint256 voting supply snapshot for the given _proposalId\"}},\"getVotingWeight(address,uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\",\"_voter\":\"address of the voter\"},\"returns\":{\"_0\":\"uint256 the address' voting weight\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address)\":{\"params\":{\"_address\":\"address to check\",\"_proposalId\":\"id of the Proposal to check\"},\"returns\":{\"_0\":\"bool true if the address has voted on the Proposal, otherwise false\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"meetsQuorum(uint256,uint256,uint256)\":{\"params\":{\"_abstainVotes\":\"number of votes abstaining\",\"_totalSupply\":\"the total supply of tokens\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the total number of yes votes + abstain meets the quorum\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"quorumVotes(uint32)\":{\"params\":{\"_proposalId\":\"The ID of the proposal to get quorum votes for\"},\"returns\":{\"_0\":\"uint256 The quantity of votes required to meet quorum\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateQuorumNumerator(uint256)\":{\"params\":{\"_quorumNumerator\":\"numerator to use when calculating quorum (over 1,000,000)\"}},\"updateRequiredProposerWeight(uint256)\":{\"params\":{\"_requiredProposerWeight\":\"required token voting weight\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8)\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"errors\":{\"InvalidQuorumNumerator()\":[{\"notice\":\"Ensures the numerator cannot be larger than the denominator. \"}]},\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"QUORUM_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating quorum (1,000,000). \"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getProposalVotingSupply(uint32)\":{\"notice\":\"Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails.\"},\"getVotingWeight(address,uint32)\":{\"notice\":\"Calculates the voting weight an address has for a specific Proposal.\"},\"hasVoted(uint32,address)\":{\"notice\":\"Returns whether an address has voted on the specified Proposal.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"meetsQuorum(uint256,uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes.\"},\"quorumNumerator()\":{\"notice\":\"The numerator to use when calculating quorum (adjustable). \"},\"quorumVotes(uint32)\":{\"notice\":\"Calculates the total number of votes required for a proposal to meet quorum. \"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"requiredProposerWeight()\":{\"notice\":\"Voting weight required to be able to submit Proposals. \"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateQuorumNumerator(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateRequiredProposerWeight(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8)\":{\"notice\":\"Casts votes for a Proposal, equal to the caller's token delegation.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":\"LinearERC20VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/azorius/BaseQuorumPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based quorums.\\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\\n */\\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating quorum (adjustable). */\\n uint256 public quorumNumerator;\\n\\n /** The denominator to use when calculating quorum (1,000,000). */\\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\\n\\n /** Ensures the numerator cannot be larger than the denominator. */\\n error InvalidQuorumNumerator();\\n\\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\\n\\n /** \\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\\n */\\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\\n _updateQuorumNumerator(_quorumNumerator);\\n }\\n\\n /** Internal implementation of `updateQuorumNumerator`. */\\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\\n if (_quorumNumerator > QUORUM_DENOMINATOR)\\n revert InvalidQuorumNumerator();\\n\\n quorumNumerator = _quorumNumerator;\\n\\n emit QuorumNumeratorUpdated(_quorumNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\\n * votes.\\n *\\n * @param _totalSupply the total supply of tokens\\n * @param _yesVotes number of votes in favor\\n * @param _abstainVotes number of votes abstaining\\n * @return bool whether the total number of yes votes + abstain meets the quorum\\n */\\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\\n }\\n\\n /**\\n * Calculates the total number of votes required for a proposal to meet quorum.\\n * \\n * @param _proposalId The ID of the proposal to get quorum votes for\\n * @return uint256 The quantity of votes required to meet quorum\\n */\\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x0218f97766d3b796f72e4ee0e1b267e72ccad8d979dfd14c5699f93d05c64c29\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC20VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IVotes} from \\\"@openzeppelin/contracts/governance/utils/IVotes.sol\\\";\\nimport {BaseStrategy, IBaseStrategy} from \\\"../BaseStrategy.sol\\\";\\nimport {BaseQuorumPercent} from \\\"../BaseQuorumPercent.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\\n *\\n * This contract is an extensible version of LinearERC20Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC20VotingExtensible is\\n BaseStrategy,\\n BaseQuorumPercent,\\n BaseVotingBasisPercent\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\\n }\\n\\n IVotes public governanceToken;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /** Voting weight required to be able to submit Proposals. */\\n uint256 public requiredProposerWeight;\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) internal proposalVotes;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n uint256 weight\\n );\\n\\n error InvalidProposal();\\n error VotingEnded();\\n error AlreadyVoted();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n IVotes _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _requiredProposerWeight,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (address, IVotes, address, uint32, uint256, uint256, uint256)\\n );\\n if (address(_governanceToken) == address(0))\\n revert InvalidTokenAddress();\\n\\n governanceToken = _governanceToken;\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumNumerator(_quorumNumerator);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _requiredProposerWeight required token voting weight\\n */\\n function updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) external virtual onlyOwner {\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n }\\n\\n /**\\n * Casts votes for a Proposal, equal to the caller's token delegation.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n */\\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\\n _vote(\\n _proposalId,\\n msg.sender,\\n _voteType,\\n getVotingWeight(msg.sender, _proposalId)\\n );\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock,\\n uint256 votingSupply\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n votingSupply = getProposalVotingSupply(_proposalId);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /**\\n * Returns whether an address has voted on the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal to check\\n * @param _address address to check\\n * @return bool true if the address has voted on the Proposal, otherwise false\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _address\\n ) public view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_address];\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n meetsQuorum(\\n getProposalVotingSupply(_proposalId),\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].abstainVotes\\n ) && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /**\\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\\n * not when it is being voted on passes / fails.\\n *\\n * @param _proposalId id of the Proposal\\n * @return uint256 voting supply snapshot for the given _proposalId\\n */\\n function getProposalVotingSupply(\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastTotalSupply(\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /**\\n * Calculates the voting weight an address has for a specific Proposal.\\n *\\n * @param _voter address of the voter\\n * @param _proposalId id of the Proposal\\n * @return uint256 the address' voting weight\\n */\\n function getVotingWeight(\\n address _voter,\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastVotes(\\n _voter,\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n return\\n governanceToken.getPastVotes(_address, block.number - 1) >=\\n requiredProposerWeight;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateRequiredProposerWeight`. */\\n function _updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) internal virtual {\\n requiredProposerWeight = _requiredProposerWeight;\\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _weight amount of voting weight cast, typically the\\n * total number of tokens delegated\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n uint256 _weight\\n ) internal virtual {\\n if (proposalVotes[_proposalId].votingEndBlock == 0)\\n revert InvalidProposal();\\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\\n revert VotingEnded();\\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\\n\\n proposalVotes[_proposalId].hasVoted[_voter] = true;\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposalVotes[_proposalId].noVotes += _weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposalVotes[_proposalId].yesVotes += _weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposalVotes[_proposalId].abstainVotes += _weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _weight);\\n }\\n\\n /** @inheritdoc BaseQuorumPercent*/\\n function quorumVotes(\\n uint32 _proposalId\\n ) public view virtual override returns (uint256) {\\n return\\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\\n QUORUM_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x18b46de302f756d61b4a47c65fae9b676a6352490739a643527ea5c0ccc2eea4\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {LinearERC20VotingExtensible} from \\\"./LinearERC20VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC20VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC20VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\\n * `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n {\\n (\\n address _owner,\\n address _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address,\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC20VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _governanceToken,\\n _azoriusModule,\\n _votingPeriod,\\n 0, // requiredProposerWeight is zero because we only care about the hat check\\n _quorumNumerator,\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0xa072c25a19494d97729e7b56dafa7a7b75caa3558620784ffef077af1f2f428a\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611b60806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getProposalVotingSupply(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "_0": "uint256 voting supply snapshot for the given _proposalId" + } + }, + "getVotingWeight(address,uint32)": { + "params": { + "_proposalId": "id of the Proposal", + "_voter": "address of the voter" + }, + "returns": { + "_0": "uint256 the address' voting weight" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address)": { + "params": { + "_address": "address to check", + "_proposalId": "id of the Proposal to check" + }, + "returns": { + "_0": "bool true if the address has voted on the Proposal, otherwise false" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "meetsQuorum(uint256,uint256,uint256)": { + "params": { + "_abstainVotes": "number of votes abstaining", + "_totalSupply": "the total supply of tokens", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the total number of yes votes + abstain meets the quorum" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "quorumVotes(uint32)": { + "params": { + "_proposalId": "The ID of the proposal to get quorum votes for" + }, + "returns": { + "_0": "uint256 The quantity of votes required to meet quorum" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateQuorumNumerator(uint256)": { + "params": { + "_quorumNumerator": "numerator to use when calculating quorum (over 1,000,000)" + } + }, + "updateRequiredProposerWeight(uint256)": { + "params": { + "_requiredProposerWeight": "required token voting weight" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8)": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "errors": { + "InvalidQuorumNumerator()": [ + { + "notice": "Ensures the numerator cannot be larger than the denominator. " + } + ] + }, + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "QUORUM_DENOMINATOR()": { + "notice": "The denominator to use when calculating quorum (1,000,000). " + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getProposalVotingSupply(uint32)": { + "notice": "Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails." + }, + "getVotingWeight(address,uint32)": { + "notice": "Calculates the voting weight an address has for a specific Proposal." + }, + "hasVoted(uint32,address)": { + "notice": "Returns whether an address has voted on the specified Proposal." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "meetsQuorum(uint256,uint256,uint256)": { + "notice": "Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes." + }, + "quorumNumerator()": { + "notice": "The numerator to use when calculating quorum (adjustable). " + }, + "quorumVotes(uint32)": { + "notice": "Calculates the total number of votes required for a proposal to meet quorum. " + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "requiredProposerWeight()": { + "notice": "Voting weight required to be able to submit Proposals. " + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateQuorumNumerator(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateRequiredProposerWeight(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8)": { + "notice": "Casts votes for a Proposal, equal to the caller's token delegation." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 801, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "quorumNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "105", + "type": "t_uint256" + }, + { + "astId": 1629, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "governanceToken", + "offset": 0, + "slot": "106", + "type": "t_contract(IVotes)663" + }, + { + "astId": 1632, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 20, + "slot": "106", + "type": "t_uint32" + }, + { + "astId": 1635, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "requiredProposerWeight", + "offset": 0, + "slot": "107", + "type": "t_uint256" + }, + { + "astId": 1641, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "108", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)" + } + ], + "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_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "t_contract(IVotes)663": { + "encoding": "inplace", + "label": "contract IVotes", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC20VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)1626_storage" + }, + "t_struct(ProposalVotes)1626_storage": { + "encoding": "inplace", + "label": "struct LinearERC20VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 1613, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1615, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1617, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 1619, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 1621, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 1625, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_bool)" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/LinearERC721VotingWithHatsProposalCreation.json b/deployments/base/LinearERC721VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..b01807c --- /dev/null +++ b/deployments/base/LinearERC721VotingWithHatsProposalCreation.json @@ -0,0 +1,1440 @@ +{ + "address": "0x6DC755EDe0faA526b06fb21DccaA64f3c218fa0a", + "abi": [ + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdAlreadyVoted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdNotOwned", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParams", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotingWeight", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "TokenAlreadySet", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "GovernanceTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "GovernanceTokenRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposerThreshold", + "type": "uint256" + } + ], + "name": "ProposerThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumThreshold", + "type": "uint256" + } + ], + "name": "QuorumThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "tokenAddresses", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_weight", + "type": "uint256" + } + ], + "name": "addGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllTokenAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "getTokenWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint32", + "name": "votingStartBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposerThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "removeGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokenAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenWeights", + "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": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_proposerThreshold", + "type": "uint256" + } + ], + "name": "updateProposerThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumThreshold", + "type": "uint256" + } + ], + "name": "updateQuorumThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "_tokenAddresses", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x122d9b1d5ef8ffa55bbcc9f066a1ca26cdfe087be9a405e55d7acd2a72fcab9e", + "receipt": { + "to": null, + "from": "0xb5Ca125166C1987A35EDD550E16846Fa1e1D9bB3", + "contractAddress": "0x6DC755EDe0faA526b06fb21DccaA64f3c218fa0a", + "transactionIndex": 123, + "gasUsed": "1961378", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000400000000000000000000000000000000000000000000000040000000000000000000000200000020000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xef3fae86d379894e125e5bea154acc514a864dde75c3bdc236ece430cdbf0f80", + "transactionHash": "0x122d9b1d5ef8ffa55bbcc9f066a1ca26cdfe087be9a405e55d7acd2a72fcab9e", + "logs": [ + { + "transactionIndex": 123, + "blockNumber": 22062707, + "transactionHash": "0x122d9b1d5ef8ffa55bbcc9f066a1ca26cdfe087be9a405e55d7acd2a72fcab9e", + "address": "0x6DC755EDe0faA526b06fb21DccaA64f3c218fa0a", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 450, + "blockHash": "0xef3fae86d379894e125e5bea154acc514a864dde75c3bdc236ece430cdbf0f80" + } + ], + "blockNumber": 22062707, + "cumulativeGasUsed": "26836254", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdNotOwned\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoVotingWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"GovernanceTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"GovernanceTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"ProposerThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"QuorumThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokenAddresses\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_weight\",\"type\":\"uint256\"}],\"name\":\"addGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllTokenAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalVotes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"votingStartBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposerThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorumThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"removeGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenWeights\",\"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\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"updateProposerThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"updateQuorumThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"_tokenAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"addGovernanceToken(address,uint256)\":{\"params\":{\"_tokenAddress\":\"the address of the ERC-721 token\",\"_weight\":\"the number of votes each NFT id is worth\"}},\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getTokenWeight(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token address\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address,uint256)\":{\"params\":{\"_proposalId\":\"the id of the Proposal\",\"_tokenAddress\":\"the ERC-721 contract address\",\"_tokenId\":\"the unique id of the NFT\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeGovernanceToken(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token to remove\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateProposerThreshold(uint256)\":{\"params\":{\"_proposerThreshold\":\"required voting weight\"}},\"updateQuorumThreshold(uint256)\":{\"params\":{\"_quorumThreshold\":\"total voting weight required to achieve quorum\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8,address[],uint256[])\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_tokenAddresses\":\"list of ERC-721 addresses that correspond to ids in _tokenIds\",\"_tokenIds\":\"list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"addGovernanceToken(address,uint256)\":{\"notice\":\"Adds a new ERC-721 token as a governance token, along with its associated weight.\"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getAllTokenAddresses()\":{\"notice\":\"Returns whole list of governance tokens addresses\"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getTokenWeight(address)\":{\"notice\":\"Returns the current token weight for the given ERC-721 token address.\"},\"hasVoted(uint32,address,uint256)\":{\"notice\":\"Returns whether an NFT id has already voted.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"proposalVotes(uint256)\":{\"notice\":\"`proposalId` to `ProposalVotes`, the voting state of a Proposal. \"},\"proposerThreshold()\":{\"notice\":\"The minimum number of voting power required to create a new proposal.\"},\"quorumThreshold()\":{\"notice\":\"The total number of votes required to achieve quorum. \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this.\"},\"removeGovernanceToken(address)\":{\"notice\":\"Removes the given ERC-721 token address from the list of governance tokens.\"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"tokenAddresses(uint256)\":{\"notice\":\"The list of ERC-721 tokens that can vote. \"},\"tokenWeights(address)\":{\"notice\":\"ERC-721 address to its voting weight per NFT id. \"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateProposerThreshold(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateQuorumThreshold(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8,address[],uint256[])\":{\"notice\":\"Submits a vote on an existing Proposal.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":\"LinearERC721VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"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/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IERC721VotingStrategy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\n/**\\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\\n * voting strategy.\\n */\\ninterface IERC721VotingStrategy {\\n\\n /**\\n * Returns the current token weight for the given ERC-721 token address.\\n *\\n * @param _tokenAddress the ERC-721 token address\\n */\\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa51db3de9ceb151077007952031ac96263b8138c8ae74758f98a4d5bd71fa86c\",\"license\":\"MIT\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC721VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {IERC721VotingStrategy} from \\\"../interfaces/IERC721VotingStrategy.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\nimport {IAzorius} from \\\"../interfaces/IAzorius.sol\\\";\\nimport {BaseStrategy} from \\\"../BaseStrategy.sol\\\";\\n\\n/**\\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\\n * each with their own voting weight.\\n *\\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\\n *\\n * Also, this uses \\\"quorumThreshold\\\" rather than LinearERC20Voting's quorumPercent, because the\\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\\n * \\\"total signers\\\" required, rather than a percentage of the tokens.\\n *\\n * This contract is an extensible version of LinearERC721Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC721VotingExtensible is\\n BaseStrategy,\\n BaseVotingBasisPercent,\\n IERC721VotingStrategy\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n /**\\n * ERC-721 contract address to individual NFT id to bool\\n * of whether it has voted on this proposal.\\n */\\n mapping(address => mapping(uint256 => bool)) hasVoted;\\n }\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) public proposalVotes;\\n\\n /** The list of ERC-721 tokens that can vote. */\\n address[] public tokenAddresses;\\n\\n /** ERC-721 address to its voting weight per NFT id. */\\n mapping(address => uint256) public tokenWeights;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /**\\n * The total number of votes required to achieve quorum.\\n * \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no\\n * totalSupply function, so the contract cannot determine this.\\n */\\n uint256 public quorumThreshold;\\n\\n /**\\n * The minimum number of voting power required to create a new proposal.\\n */\\n uint256 public proposerThreshold;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event QuorumThresholdUpdated(uint256 quorumThreshold);\\n event ProposerThresholdUpdated(uint256 proposerThreshold);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n address[] tokenAddresses,\\n uint256[] tokenIds\\n );\\n event GovernanceTokenAdded(address token, uint256 weight);\\n event GovernanceTokenRemoved(address token);\\n\\n error InvalidParams();\\n error InvalidProposal();\\n error VotingEnded();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n error NoVotingWeight();\\n error TokenAlreadySet();\\n error TokenNotSet();\\n error IdAlreadyVoted(uint256 tokenId);\\n error IdNotOwned(uint256 tokenId);\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _proposerThreshold,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n uint256\\n )\\n );\\n\\n if (_tokens.length != _weights.length) {\\n revert InvalidParams();\\n }\\n\\n for (uint i = 0; i < _tokens.length; ) {\\n _addGovernanceToken(_tokens[i], _weights[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumThreshold(_quorumThreshold);\\n _updateProposerThreshold(_proposerThreshold);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\\n *\\n * @param _tokenAddress the address of the ERC-721 token\\n * @param _weight the number of votes each NFT id is worth\\n */\\n function addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) external virtual onlyOwner {\\n _addGovernanceToken(_tokenAddress, _weight);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumThreshold total voting weight required to achieve quorum\\n */\\n function updateQuorumThreshold(\\n uint256 _quorumThreshold\\n ) external virtual onlyOwner {\\n _updateQuorumThreshold(_quorumThreshold);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _proposerThreshold required voting weight\\n */\\n function updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) external virtual onlyOwner {\\n _updateProposerThreshold(_proposerThreshold);\\n }\\n\\n /**\\n * Returns whole list of governance tokens addresses\\n */\\n function getAllTokenAddresses()\\n external\\n view\\n virtual\\n returns (address[] memory)\\n {\\n return tokenAddresses;\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /**\\n * Submits a vote on an existing Proposal.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function vote(\\n uint32 _proposalId,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) external virtual {\\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\\n }\\n\\n /** @inheritdoc IERC721VotingStrategy*/\\n function getTokenWeight(\\n address _tokenAddress\\n ) external view virtual override returns (uint256) {\\n return tokenWeights[_tokenAddress];\\n }\\n\\n /**\\n * Returns whether an NFT id has already voted.\\n *\\n * @param _proposalId the id of the Proposal\\n * @param _tokenAddress the ERC-721 contract address\\n * @param _tokenId the unique id of the NFT\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _tokenAddress,\\n uint256 _tokenId\\n ) external view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\\n }\\n\\n /**\\n * Removes the given ERC-721 token address from the list of governance tokens.\\n *\\n * @param _tokenAddress the ERC-721 token to remove\\n */\\n function removeGovernanceToken(\\n address _tokenAddress\\n ) external virtual onlyOwner {\\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\\n\\n tokenWeights[_tokenAddress] = 0;\\n\\n uint256 length = tokenAddresses.length;\\n for (uint256 i = 0; i < length; ) {\\n if (_tokenAddress == tokenAddresses[i]) {\\n uint256 last = length - 1;\\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\\n delete tokenAddresses[last]; // delete the last token\\n break;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit GovernanceTokenRemoved(_tokenAddress);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n quorumThreshold <=\\n proposalVotes[_proposalId].yesVotes +\\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n uint256 totalWeight = 0;\\n for (uint i = 0; i < tokenAddresses.length; ) {\\n address tokenAddress = tokenAddresses[i];\\n totalWeight +=\\n IERC721(tokenAddress).balanceOf(_address) *\\n tokenWeights[tokenAddress];\\n unchecked {\\n ++i;\\n }\\n }\\n return totalWeight >= proposerThreshold;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `addGovernanceToken` */\\n function _addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) internal virtual {\\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\\n revert InvalidTokenAddress();\\n\\n if (_weight == 0) revert NoVotingWeight();\\n\\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\\n\\n tokenAddresses.push(_tokenAddress);\\n tokenWeights[_tokenAddress] = _weight;\\n\\n emit GovernanceTokenAdded(_tokenAddress, _weight);\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateQuorumThreshold`. */\\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\\n quorumThreshold = _quorumThreshold;\\n emit QuorumThresholdUpdated(quorumThreshold);\\n }\\n\\n /** Internal implementation of `updateProposerThreshold`. */\\n function _updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) internal virtual {\\n proposerThreshold = _proposerThreshold;\\n emit ProposerThresholdUpdated(_proposerThreshold);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) internal virtual {\\n uint256 weight;\\n\\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\\n // to vote twice if you get more weight later on\\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\\n address tokenAddress = _tokenAddresses[i];\\n uint256 tokenId = _tokenIds[i];\\n\\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\\n revert IdNotOwned(tokenId);\\n }\\n\\n if (\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\\n true\\n ) {\\n revert IdAlreadyVoted(tokenId);\\n }\\n\\n weight += tokenWeights[tokenAddress];\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (weight == 0) revert NoVotingWeight();\\n\\n ProposalVotes storage proposal = proposalVotes[_proposalId];\\n\\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\\n\\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposal.noVotes += weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposal.yesVotes += weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposal.abstainVotes += weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\\n }\\n}\\n\",\"keccak256\":\"0xd4080f58d0b3abe47b825f0b43fc5061143319a93de5ff8752b6591d3effef75\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {LinearERC721VotingExtensible} from \\\"./LinearERC721VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC721VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC721VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC721VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _tokens,\\n _weights,\\n _azoriusModule,\\n _votingPeriod,\\n _quorumThreshold,\\n 0, // _proposerThreshold is zero because we only care about the hat check\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0x78f0f627fe0f63c7d1ae8ec0333f0e55d801412f34b7597b12e9007a23fcd0d7\",\"license\":\"MIT\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61220680620000ee6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "addGovernanceToken(address,uint256)": { + "params": { + "_tokenAddress": "the address of the ERC-721 token", + "_weight": "the number of votes each NFT id is worth" + } + }, + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getTokenWeight(address)": { + "params": { + "_tokenAddress": "the ERC-721 token address" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address,uint256)": { + "params": { + "_proposalId": "the id of the Proposal", + "_tokenAddress": "the ERC-721 contract address", + "_tokenId": "the unique id of the NFT" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "removeGovernanceToken(address)": { + "params": { + "_tokenAddress": "the ERC-721 token to remove" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateProposerThreshold(uint256)": { + "params": { + "_proposerThreshold": "required voting weight" + } + }, + "updateQuorumThreshold(uint256)": { + "params": { + "_quorumThreshold": "total voting weight required to achieve quorum" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8,address[],uint256[])": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_tokenAddresses": "list of ERC-721 addresses that correspond to ids in _tokenIds", + "_tokenIds": "list of unique token ids that correspond to their ERC-721 address in _tokenAddresses", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "addGovernanceToken(address,uint256)": { + "notice": "Adds a new ERC-721 token as a governance token, along with its associated weight." + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getAllTokenAddresses()": { + "notice": "Returns whole list of governance tokens addresses" + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getTokenWeight(address)": { + "notice": "Returns the current token weight for the given ERC-721 token address." + }, + "hasVoted(uint32,address,uint256)": { + "notice": "Returns whether an NFT id has already voted." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "proposalVotes(uint256)": { + "notice": "`proposalId` to `ProposalVotes`, the voting state of a Proposal. " + }, + "proposerThreshold()": { + "notice": "The minimum number of voting power required to create a new proposal." + }, + "quorumThreshold()": { + "notice": "The total number of votes required to achieve quorum. \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this." + }, + "removeGovernanceToken(address)": { + "notice": "Removes the given ERC-721 token address from the list of governance tokens." + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "tokenAddresses(uint256)": { + "notice": "The list of ERC-721 tokens that can vote. " + }, + "tokenWeights(address)": { + "notice": "ERC-721 address to its voting weight per NFT id. " + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateProposerThreshold(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateQuorumThreshold(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8,address[],uint256[])": { + "notice": "Submits a vote on an existing Proposal." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 2378, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)" + }, + { + "astId": 2382, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenAddresses", + "offset": 0, + "slot": "106", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 2387, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenWeights", + "offset": 0, + "slot": "107", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2390, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 0, + "slot": "108", + "type": "t_uint32" + }, + { + "astId": 2393, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "quorumThreshold", + "offset": 0, + "slot": "109", + "type": "t_uint256" + }, + { + "astId": 2396, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposerThreshold", + "offset": 0, + "slot": "110", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "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_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => 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_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC721VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)2372_storage" + }, + "t_struct(ProposalVotes)2372_storage": { + "encoding": "inplace", + "label": "struct LinearERC721VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 2356, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2358, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2360, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2362, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 2364, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2371, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json b/deployments/base/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json new file mode 100644 index 0000000..df3a3a7 --- /dev/null +++ b/deployments/base/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json @@ -0,0 +1,107 @@ +{ + "language": "Solidity", + "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" + }, + "@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/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" + }, + "@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/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/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\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/azorius/BaseQuorumPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based quorums.\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\n */\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating quorum (adjustable). */\n uint256 public quorumNumerator;\n\n /** The denominator to use when calculating quorum (1,000,000). */\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\n\n /** Ensures the numerator cannot be larger than the denominator. */\n error InvalidQuorumNumerator();\n\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\n\n /** \n * Updates the quorum required for future Proposals.\n *\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\n */\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\n _updateQuorumNumerator(_quorumNumerator);\n }\n\n /** Internal implementation of `updateQuorumNumerator`. */\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\n if (_quorumNumerator > QUORUM_DENOMINATOR)\n revert InvalidQuorumNumerator();\n\n quorumNumerator = _quorumNumerator;\n\n emit QuorumNumeratorUpdated(_quorumNumerator);\n }\n\n /**\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\n * votes.\n *\n * @param _totalSupply the total supply of tokens\n * @param _yesVotes number of votes in favor\n * @param _abstainVotes number of votes abstaining\n * @return bool whether the total number of yes votes + abstain meets the quorum\n */\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\n }\n\n /**\n * Calculates the total number of votes required for a proposal to meet quorum.\n * \n * @param _proposalId The ID of the proposal to get quorum votes for\n * @return uint256 The quantity of votes required to meet quorum\n */\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\n}\n" + }, + "contracts/azorius/BaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { IAzorius } from \"./interfaces/IAzorius.sol\";\nimport { IBaseStrategy } from \"./interfaces/IBaseStrategy.sol\";\nimport { FactoryFriendly } from \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * The base abstract contract for all voting strategies in Azorius.\n */\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\n\n event AzoriusSet(address indexed azoriusModule);\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\n\n error OnlyAzorius();\n\n IAzorius public azoriusModule;\n\n /**\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\n */\n modifier onlyAzorius() {\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\n _;\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /** @inheritdoc IBaseStrategy*/\n function setAzorius(address _azoriusModule) external onlyOwner {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n\n /** @inheritdoc IBaseStrategy*/\n function initializeProposal(bytes memory _data) external virtual;\n\n /** @inheritdoc IBaseStrategy*/\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function isProposer(address _address) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\n\n /**\n * Sets the address of the [Azorius](Azorius.md) module contract.\n *\n * @param _azoriusModule address of the Azorius module\n */\n function _setAzorius(address _azoriusModule) internal {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n}\n" + }, + "contracts/azorius/BaseVotingBasisPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based voting basis calculations.\n *\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\n *\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\n * See https://en.wikipedia.org/wiki/Supermajority.\n */\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating basis (adjustable). */\n uint256 public basisNumerator;\n\n /** The denominator to use when calculating basis (1,000,000). */\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\n\n error InvalidBasisNumerator();\n\n event BasisNumeratorUpdated(uint256 basisNumerator);\n\n /**\n * Updates the `basisNumerator` for future Proposals.\n *\n * @param _basisNumerator numerator to use\n */\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\n _updateBasisNumerator(_basisNumerator);\n }\n\n /** Internal implementation of `updateBasisNumerator`. */\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\n revert InvalidBasisNumerator();\n\n basisNumerator = _basisNumerator;\n\n emit BasisNumeratorUpdated(_basisNumerator);\n }\n\n /**\n * Calculates whether a vote meets its basis.\n *\n * @param _yesVotes number of votes in favor\n * @param _noVotes number of votes against\n * @return bool whether the yes votes meets the set basis\n */\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/interfaces/IAzorius.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport { Enum } from \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\n/**\n * The base interface for the Azorius governance Safe module.\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\n *\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\n *\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\n * as customizable as possible.\n *\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\n *\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\n * for the duration of its voting period.\n *\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\n * it cannot yet be executed. This is to allow time for token holders\n * to potentially exit their position, as well as parent DAOs time to\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\n * for the duration of its `timelockPeriod`.\n *\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\n * and can then finally be executed on chain by anyone.\n *\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\n * on the blockchain.\n *\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\n * elapsed will be `EXPIRED`, and can no longer be executed.\n *\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \n * `isPassed` function). For a basic strategy, this would mean it received more \n * NO votes than YES or did not achieve quorum. \n */\ninterface IAzorius {\n\n /** Represents a transaction to perform on the blockchain. */\n struct Transaction {\n address to; // destination address of the transaction\n uint256 value; // amount of ETH to transfer with the transaction\n bytes data; // encoded function call data of the transaction\n Enum.Operation operation; // Operation type, Call or DelegateCall\n }\n\n /** Holds details pertaining to a single proposal. */\n struct Proposal {\n uint32 executionCounter; // count of transactions that have been executed within the proposal\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\n address strategy; // BaseStrategy contract this proposal was created on\n bytes32[] txHashes; // hashes of the transactions that are being proposed\n }\n\n /** The list of states in which a Proposal can be in at any given time. */\n enum ProposalState {\n ACTIVE,\n TIMELOCKED,\n EXECUTABLE,\n EXECUTED,\n EXPIRED,\n FAILED\n }\n\n /**\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\n *\n * Multiple strategies can be enabled, and new Proposals will be able to be\n * created using any of the currently enabled strategies.\n *\n * @param _strategy contract address of the BaseStrategy to be enabled\n */\n function enableStrategy(address _strategy) external;\n\n /**\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\n * @param _strategy address of the BaseStrategy to be removed\n */\n function disableStrategy(address _prevStrategy, address _strategy) external;\n\n /**\n * Updates the `timelockPeriod` for newly created Proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\n */\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\n\n /**\n * Updates the execution period for future Proposals.\n *\n * @param _executionPeriod new execution period (in blocks)\n */\n function updateExecutionPeriod(uint32 _executionPeriod) external;\n\n /**\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\n * New Proposals begin immediately in the `ACTIVE` state.\n *\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \n * but is included in case future strategy contracts have a need for it\n * @param _transactions array of transactions to propose\n * @param _metadata additional data such as a title/description to submit with the proposal\n */\n function submitProposal(\n address _strategy,\n bytes memory _data,\n Transaction[] calldata _transactions,\n string calldata _metadata\n ) external;\n\n /**\n * Executes all transactions within a Proposal.\n * This will only be able to be called if the Proposal passed.\n *\n * @param _proposalId identifier of the Proposal\n * @param _targets target contracts for each transaction\n * @param _values ETH values to be sent with each transaction\n * @param _data transaction data to be executed\n * @param _operations Calls or Delegatecalls\n */\n function executeProposal(\n uint32 _proposalId,\n address[] memory _targets,\n uint256[] memory _values,\n bytes[] memory _data,\n Enum.Operation[] memory _operations\n ) external;\n\n /**\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\n *\n * @param _strategy contract address of the BaseStrategy to check\n * @return bool True if the strategy is enabled, otherwise False\n */\n function isStrategyEnabled(address _strategy) external view returns (bool);\n\n /**\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\n * Because the list of BaseStrategies is technically unbounded, this\n * requires the address of the first strategy you would like, along\n * with the total count of strategies to return, rather than\n * returning the whole list at once.\n *\n * @param _startAddress contract address of the BaseStrategy to start with\n * @param _count maximum number of BaseStrategies that should be returned\n * @return _strategies array of BaseStrategies\n * @return _next next BaseStrategy contract address in the linked list\n */\n function getStrategies(\n address _startAddress,\n uint256 _count\n ) external view returns (address[] memory _strategies, address _next);\n\n /**\n * Gets the state of a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return ProposalState uint256 ProposalState enum value representing the\n * current state of the proposal\n */\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\n\n /**\n * Generates the data for the module transaction hash (required for signing).\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @param _nonce Safe nonce of the transaction\n * @return bytes hashed transaction data\n */\n function generateTxHashData(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation,\n uint256 _nonce\n ) external view returns (bytes memory);\n\n /**\n * Returns the `keccak256` hash of the specified transaction.\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @return bytes32 transaction hash\n */\n function getTxHash(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation\n ) external view returns (bytes32);\n\n /**\n * Returns the hash of a transaction in a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @param _txIndex index of the transaction within the Proposal\n * @return bytes32 hash of the specified transaction\n */\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\n\n /**\n * Returns the transaction hashes associated with a given `proposalId`.\n *\n * @param _proposalId identifier of the Proposal to get transaction hashes for\n * @return bytes32[] array of transaction hashes\n */\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\n\n /**\n * Returns details about the specified Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return _strategy address of the BaseStrategy contract the Proposal is on\n * @return _txHashes hashes of the transactions the Proposal contains\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\n */\n function getProposal(uint32 _proposalId) external view\n returns (\n address _strategy,\n bytes32[] memory _txHashes,\n uint32 _timelockPeriod,\n uint32 _executionPeriod,\n uint32 _executionCounter\n );\n}\n" + }, + "contracts/azorius/interfaces/IBaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\n/**\n * The specification for a voting strategy in Azorius.\n *\n * Each IBaseStrategy implementation need only implement the given functions here,\n * which allows for highly composable but simple or complex voting strategies.\n *\n * It should be noted that while many voting strategies make use of parameters such as\n * voting period or quorum, that is a detail of the individual strategy itself, and not\n * a requirement for the Azorius protocol.\n */\ninterface IBaseStrategy {\n\n /**\n * Sets the address of the [Azorius](../Azorius.md) contract this \n * [BaseStrategy](../BaseStrategy.md) is being used on.\n *\n * @param _azoriusModule address of the Azorius Safe module\n */\n function setAzorius(address _azoriusModule) external;\n\n /**\n * Called by the [Azorius](../Azorius.md) module. This notifies this \n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\n *\n * @param _data arbitrary data to pass to this BaseStrategy\n */\n function initializeProposal(bytes memory _data) external;\n\n /**\n * Returns whether a Proposal has been passed.\n *\n * @param _proposalId proposalId to check\n * @return bool true if the proposal has passed, otherwise false\n */\n function isPassed(uint32 _proposalId) external view returns (bool);\n\n /**\n * Returns whether the specified address can submit a Proposal with\n * this [BaseStrategy](../BaseStrategy.md).\n *\n * This allows a BaseStrategy to place any limits it would like on\n * who can create new Proposals, such as requiring a minimum token\n * delegation.\n *\n * @param _address address to check\n * @return bool true if the address can submit a Proposal, otherwise false\n */\n function isProposer(address _address) external view returns (bool);\n\n /**\n * Returns the block number voting ends on a given Proposal.\n *\n * @param _proposalId proposalId to check\n * @return uint32 block number when voting ends on the Proposal\n */\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\n}\n" + }, + "contracts/azorius/interfaces/IERC721VotingStrategy.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\n/**\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\n * voting strategy.\n */\ninterface IERC721VotingStrategy {\n\n /**\n * Returns the current token weight for the given ERC-721 token address.\n *\n * @param _tokenAddress the ERC-721 token address\n */\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\n}\n" + }, + "contracts/azorius/strategies/HatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\n event HatWhitelisted(uint256 hatId);\n event HatRemovedFromWhitelist(uint256 hatId);\n\n IHats public hatsContract;\n\n /** Array to store whitelisted Hat IDs. */\n uint256[] private whitelistedHatIds;\n\n error InvalidHatsContract();\n error NoHatsWhitelisted();\n error HatAlreadyWhitelisted();\n error HatNotWhitelisted();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters:\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(bytes memory initializeParams) public virtual {\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\n .decode(initializeParams, (address, uint256[]));\n\n if (_hatsContract == address(0)) revert InvalidHatsContract();\n hatsContract = IHats(_hatsContract);\n\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\n _whitelistHat(_initialWhitelistedHats[i]);\n }\n }\n\n /**\n * Adds a Hat to the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to whitelist\n */\n function whitelistHat(uint256 _hatId) external onlyOwner {\n _whitelistHat(_hatId);\n }\n\n /**\n * Internal function to add a Hat to the whitelist.\n * @param _hatId The ID of the Hat to whitelist\n */\n function _whitelistHat(uint256 _hatId) internal {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\n }\n whitelistedHatIds.push(_hatId);\n emit HatWhitelisted(_hatId);\n }\n\n /**\n * Removes a Hat from the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to remove from the whitelist\n */\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\n bool found = false;\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) {\n whitelistedHatIds[i] = whitelistedHatIds[\n whitelistedHatIds.length - 1\n ];\n whitelistedHatIds.pop();\n found = true;\n break;\n }\n }\n if (!found) revert HatNotWhitelisted();\n\n emit HatRemovedFromWhitelist(_hatId);\n }\n\n /**\n * @dev Checks if an address is authorized to create proposals.\n * @param _address The address to check for proposal creation authorization.\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\n * @notice This function overrides the isProposer function from the parent contract.\n * It iterates through all whitelisted Hat IDs and checks if the given address\n * is wearing any of them using the Hats Protocol.\n */\n function isProposer(address _address) public view virtual returns (bool) {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @dev Returns the IDs of all whitelisted Hats.\n * @return uint256[] memory An array of whitelisted Hat IDs.\n */\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\n return whitelistedHatIds;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IVotes} from \"@openzeppelin/contracts/governance/utils/IVotes.sol\";\nimport {BaseStrategy, IBaseStrategy} from \"../BaseStrategy.sol\";\nimport {BaseQuorumPercent} from \"../BaseQuorumPercent.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\n *\n * This contract is an extensible version of LinearERC20Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC20VotingExtensible is\n BaseStrategy,\n BaseQuorumPercent,\n BaseVotingBasisPercent\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\n }\n\n IVotes public governanceToken;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /** Voting weight required to be able to submit Proposals. */\n uint256 public requiredProposerWeight;\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) internal proposalVotes;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n uint256 weight\n );\n\n error InvalidProposal();\n error VotingEnded();\n error AlreadyVoted();\n error InvalidVote();\n error InvalidTokenAddress();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n IVotes _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _requiredProposerWeight,\n uint256 _quorumNumerator,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (address, IVotes, address, uint32, uint256, uint256, uint256)\n );\n if (address(_governanceToken) == address(0))\n revert InvalidTokenAddress();\n\n governanceToken = _governanceToken;\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumNumerator(_quorumNumerator);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n _updateRequiredProposerWeight(_requiredProposerWeight);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _requiredProposerWeight required token voting weight\n */\n function updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) external virtual onlyOwner {\n _updateRequiredProposerWeight(_requiredProposerWeight);\n }\n\n /**\n * Casts votes for a Proposal, equal to the caller's token delegation.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n */\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\n _vote(\n _proposalId,\n msg.sender,\n _voteType,\n getVotingWeight(msg.sender, _proposalId)\n );\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock,\n uint256 votingSupply\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n votingSupply = getProposalVotingSupply(_proposalId);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /**\n * Returns whether an address has voted on the specified Proposal.\n *\n * @param _proposalId id of the Proposal to check\n * @param _address address to check\n * @return bool true if the address has voted on the Proposal, otherwise false\n */\n function hasVoted(\n uint32 _proposalId,\n address _address\n ) public view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_address];\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n meetsQuorum(\n getProposalVotingSupply(_proposalId),\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].abstainVotes\n ) && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /**\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\n * not when it is being voted on passes / fails.\n *\n * @param _proposalId id of the Proposal\n * @return uint256 voting supply snapshot for the given _proposalId\n */\n function getProposalVotingSupply(\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastTotalSupply(\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /**\n * Calculates the voting weight an address has for a specific Proposal.\n *\n * @param _voter address of the voter\n * @param _proposalId id of the Proposal\n * @return uint256 the address' voting weight\n */\n function getVotingWeight(\n address _voter,\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastVotes(\n _voter,\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n return\n governanceToken.getPastVotes(_address, block.number - 1) >=\n requiredProposerWeight;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateRequiredProposerWeight`. */\n function _updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) internal virtual {\n requiredProposerWeight = _requiredProposerWeight;\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _weight amount of voting weight cast, typically the\n * total number of tokens delegated\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n uint256 _weight\n ) internal virtual {\n if (proposalVotes[_proposalId].votingEndBlock == 0)\n revert InvalidProposal();\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\n revert VotingEnded();\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\n\n proposalVotes[_proposalId].hasVoted[_voter] = true;\n\n if (_voteType == uint8(VoteType.NO)) {\n proposalVotes[_proposalId].noVotes += _weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposalVotes[_proposalId].yesVotes += _weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposalVotes[_proposalId].abstainVotes += _weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _weight);\n }\n\n /** @inheritdoc BaseQuorumPercent*/\n function quorumVotes(\n uint32 _proposalId\n ) public view virtual override returns (uint256) {\n return\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\n QUORUM_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {LinearERC20VotingExtensible} from \"./LinearERC20VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC20VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC20VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\n * `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n {\n (\n address _owner,\n address _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumNumerator,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address,\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC20VotingExtensible.setUp(\n abi.encode(\n _owner,\n _governanceToken,\n _azoriusModule,\n _votingPeriod,\n 0, // requiredProposerWeight is zero because we only care about the hat check\n _quorumNumerator,\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {IERC721VotingStrategy} from \"../interfaces/IERC721VotingStrategy.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\nimport {IAzorius} from \"../interfaces/IAzorius.sol\";\nimport {BaseStrategy} from \"../BaseStrategy.sol\";\n\n/**\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\n * each with their own voting weight.\n *\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\n *\n * Also, this uses \"quorumThreshold\" rather than LinearERC20Voting's quorumPercent, because the\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\n * \"total signers\" required, rather than a percentage of the tokens.\n *\n * This contract is an extensible version of LinearERC721Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC721VotingExtensible is\n BaseStrategy,\n BaseVotingBasisPercent,\n IERC721VotingStrategy\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n /**\n * ERC-721 contract address to individual NFT id to bool\n * of whether it has voted on this proposal.\n */\n mapping(address => mapping(uint256 => bool)) hasVoted;\n }\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) public proposalVotes;\n\n /** The list of ERC-721 tokens that can vote. */\n address[] public tokenAddresses;\n\n /** ERC-721 address to its voting weight per NFT id. */\n mapping(address => uint256) public tokenWeights;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /**\n * The total number of votes required to achieve quorum.\n * \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no\n * totalSupply function, so the contract cannot determine this.\n */\n uint256 public quorumThreshold;\n\n /**\n * The minimum number of voting power required to create a new proposal.\n */\n uint256 public proposerThreshold;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event QuorumThresholdUpdated(uint256 quorumThreshold);\n event ProposerThresholdUpdated(uint256 proposerThreshold);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n address[] tokenAddresses,\n uint256[] tokenIds\n );\n event GovernanceTokenAdded(address token, uint256 weight);\n event GovernanceTokenRemoved(address token);\n\n error InvalidParams();\n error InvalidProposal();\n error VotingEnded();\n error InvalidVote();\n error InvalidTokenAddress();\n error NoVotingWeight();\n error TokenAlreadySet();\n error TokenNotSet();\n error IdAlreadyVoted(uint256 tokenId);\n error IdNotOwned(uint256 tokenId);\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _proposerThreshold,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n uint256\n )\n );\n\n if (_tokens.length != _weights.length) {\n revert InvalidParams();\n }\n\n for (uint i = 0; i < _tokens.length; ) {\n _addGovernanceToken(_tokens[i], _weights[i]);\n unchecked {\n ++i;\n }\n }\n\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumThreshold(_quorumThreshold);\n _updateProposerThreshold(_proposerThreshold);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\n *\n * @param _tokenAddress the address of the ERC-721 token\n * @param _weight the number of votes each NFT id is worth\n */\n function addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) external virtual onlyOwner {\n _addGovernanceToken(_tokenAddress, _weight);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the quorum required for future Proposals.\n *\n * @param _quorumThreshold total voting weight required to achieve quorum\n */\n function updateQuorumThreshold(\n uint256 _quorumThreshold\n ) external virtual onlyOwner {\n _updateQuorumThreshold(_quorumThreshold);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _proposerThreshold required voting weight\n */\n function updateProposerThreshold(\n uint256 _proposerThreshold\n ) external virtual onlyOwner {\n _updateProposerThreshold(_proposerThreshold);\n }\n\n /**\n * Returns whole list of governance tokens addresses\n */\n function getAllTokenAddresses()\n external\n view\n virtual\n returns (address[] memory)\n {\n return tokenAddresses;\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n }\n\n /**\n * Submits a vote on an existing Proposal.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function vote(\n uint32 _proposalId,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) external virtual {\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\n }\n\n /** @inheritdoc IERC721VotingStrategy*/\n function getTokenWeight(\n address _tokenAddress\n ) external view virtual override returns (uint256) {\n return tokenWeights[_tokenAddress];\n }\n\n /**\n * Returns whether an NFT id has already voted.\n *\n * @param _proposalId the id of the Proposal\n * @param _tokenAddress the ERC-721 contract address\n * @param _tokenId the unique id of the NFT\n */\n function hasVoted(\n uint32 _proposalId,\n address _tokenAddress,\n uint256 _tokenId\n ) external view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\n }\n\n /**\n * Removes the given ERC-721 token address from the list of governance tokens.\n *\n * @param _tokenAddress the ERC-721 token to remove\n */\n function removeGovernanceToken(\n address _tokenAddress\n ) external virtual onlyOwner {\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\n\n tokenWeights[_tokenAddress] = 0;\n\n uint256 length = tokenAddresses.length;\n for (uint256 i = 0; i < length; ) {\n if (_tokenAddress == tokenAddresses[i]) {\n uint256 last = length - 1;\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\n delete tokenAddresses[last]; // delete the last token\n break;\n }\n unchecked {\n ++i;\n }\n }\n\n emit GovernanceTokenRemoved(_tokenAddress);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n quorumThreshold <=\n proposalVotes[_proposalId].yesVotes +\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n uint256 totalWeight = 0;\n for (uint i = 0; i < tokenAddresses.length; ) {\n address tokenAddress = tokenAddresses[i];\n totalWeight +=\n IERC721(tokenAddress).balanceOf(_address) *\n tokenWeights[tokenAddress];\n unchecked {\n ++i;\n }\n }\n return totalWeight >= proposerThreshold;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `addGovernanceToken` */\n function _addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) internal virtual {\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\n revert InvalidTokenAddress();\n\n if (_weight == 0) revert NoVotingWeight();\n\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\n\n tokenAddresses.push(_tokenAddress);\n tokenWeights[_tokenAddress] = _weight;\n\n emit GovernanceTokenAdded(_tokenAddress, _weight);\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateQuorumThreshold`. */\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\n quorumThreshold = _quorumThreshold;\n emit QuorumThresholdUpdated(quorumThreshold);\n }\n\n /** Internal implementation of `updateProposerThreshold`. */\n function _updateProposerThreshold(\n uint256 _proposerThreshold\n ) internal virtual {\n proposerThreshold = _proposerThreshold;\n emit ProposerThresholdUpdated(_proposerThreshold);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) internal virtual {\n uint256 weight;\n\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\n // to vote twice if you get more weight later on\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\n address tokenAddress = _tokenAddresses[i];\n uint256 tokenId = _tokenIds[i];\n\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\n revert IdNotOwned(tokenId);\n }\n\n if (\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\n true\n ) {\n revert IdAlreadyVoted(tokenId);\n }\n\n weight += tokenWeights[tokenAddress];\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\n unchecked {\n ++i;\n }\n }\n\n if (weight == 0) revert NoVotingWeight();\n\n ProposalVotes storage proposal = proposalVotes[_proposalId];\n\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\n\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\n\n if (_voteType == uint8(VoteType.NO)) {\n proposal.noVotes += weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposal.yesVotes += weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposal.abstainVotes += weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {LinearERC721VotingExtensible} from \"./LinearERC721VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC721VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC721VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC721VotingExtensible.setUp(\n abi.encode(\n _owner,\n _tokens,\n _weights,\n _azoriusModule,\n _votingPeriod,\n _quorumThreshold,\n 0, // _proposerThreshold is zero because we only care about the hat check\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/interfaces/hats/HatsErrors.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsErrors {\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\n error NotAdmin(address user, uint256 hatId);\n\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\n error NotHatWearer();\n\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\n error NotAdminOrWearer();\n\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\n error AllHatsWorn(uint256 hatId);\n\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\n error MaxLevelsReached();\n\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\n error InvalidHatId();\n\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\n error AlreadyWearingHat(address wearer, uint256 hatId);\n\n /// @notice Emitted when attempting to mint a non-existant hat\n error HatDoesNotExist(uint256 hatId);\n\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\n error HatNotActive();\n\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\n error NotEligible();\n\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\n error NotHatsToggle();\n\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\n error NotHatsEligibility();\n\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\n error BatchArrayLengthMismatch();\n\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\n error Immutable();\n\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\n error NewMaxSupplyTooLow();\n\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\n error CircularLinkage();\n\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\n error CrossTreeLinkage();\n\n /// @notice Emitted when attempting to link a tophat without a request\n error LinkageNotRequested();\n\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\n /// @dev This ensures that unlinking never results in a bricked tophat\n error InvalidUnlink();\n\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\n error ZeroAddress();\n\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\n error StringTooLong();\n}\n" + }, + "contracts/interfaces/hats/HatsEvents.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsEvents {\n /// @notice Emitted when a new hat is created\n /// @param id The id for the new hat\n /// @param details A description of the Hat\n /// @param maxSupply The total instances of the Hat that can be worn at once\n /// @param eligibility The address that can report on the Hat wearer's status\n /// @param toggle The address that can deactivate the Hat\n /// @param mutable_ Whether the hat's properties are changeable after creation\n /// @param imageURI The image uri for this hat and the fallback for its\n event HatCreated(\n uint256 id,\n string details,\n uint32 maxSupply,\n address eligibility,\n address toggle,\n bool mutable_,\n string imageURI\n );\n\n /// @notice Emitted when a hat wearer's standing is updated\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\n /// @param hatId The id of the wearer's hat\n /// @param wearer The wearer's address\n /// @param wearerStanding Whether the wearer is in good standing for the hat\n event WearerStandingChanged(\n uint256 hatId,\n address wearer,\n bool wearerStanding\n );\n\n /// @notice Emitted when a hat's status is updated\n /// @param hatId The id of the hat\n /// @param newStatus Whether the hat is active\n event HatStatusChanged(uint256 hatId, bool newStatus);\n\n /// @notice Emitted when a hat's details are updated\n /// @param hatId The id of the hat\n /// @param newDetails The updated details\n event HatDetailsChanged(uint256 hatId, string newDetails);\n\n /// @notice Emitted when a hat's eligibility module is updated\n /// @param hatId The id of the hat\n /// @param newEligibility The updated eligibiliy module\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\n\n /// @notice Emitted when a hat's toggle module is updated\n /// @param hatId The id of the hat\n /// @param newToggle The updated toggle module\n event HatToggleChanged(uint256 hatId, address newToggle);\n\n /// @notice Emitted when a hat's mutability is updated\n /// @param hatId The id of the hat\n event HatMutabilityChanged(uint256 hatId);\n\n /// @notice Emitted when a hat's maximum supply is updated\n /// @param hatId The id of the hat\n /// @param newMaxSupply The updated max supply\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\n\n /// @notice Emitted when a hat's image URI is updated\n /// @param hatId The id of the hat\n /// @param newImageURI The updated image URI\n event HatImageURIChanged(uint256 hatId, string newImageURI);\n\n /// @notice Emitted when a tophat linkage is requested by its admin\n /// @param domain The domain of the tree tophat to link\n /// @param newAdmin The tophat's would-be admin in the parent tree\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\n\n /// @notice Emitted when a tophat is linked to a another tree\n /// @param domain The domain of the newly-linked tophat\n /// @param newAdmin The tophat's new admin in the parent tree\n event TopHatLinked(uint32 domain, uint256 newAdmin);\n}\n" + }, + "contracts/interfaces/hats/IHats.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\nimport \"./IHatsIdUtilities.sol\";\nimport \"./HatsErrors.sol\";\nimport \"./HatsEvents.sol\";\n\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\n function mintTopHat(\n address _target,\n string memory _details,\n string memory _imageURI\n ) external returns (uint256 topHatId);\n\n function createHat(\n uint256 _admin,\n string calldata _details,\n uint32 _maxSupply,\n address _eligibility,\n address _toggle,\n bool _mutable,\n string calldata _imageURI\n ) external returns (uint256 newHatId);\n\n function batchCreateHats(\n uint256[] calldata _admins,\n string[] calldata _details,\n uint32[] calldata _maxSupplies,\n address[] memory _eligibilityModules,\n address[] memory _toggleModules,\n bool[] calldata _mutables,\n string[] calldata _imageURIs\n ) external returns (bool success);\n\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\n\n function mintHat(\n uint256 _hatId,\n address _wearer\n ) external returns (bool success);\n\n function batchMintHats(\n uint256[] calldata _hatIds,\n address[] calldata _wearers\n ) external returns (bool success);\n\n function setHatStatus(\n uint256 _hatId,\n bool _newStatus\n ) external returns (bool toggled);\n\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\n\n function setHatWearerStatus(\n uint256 _hatId,\n address _wearer,\n bool _eligible,\n bool _standing\n ) external returns (bool updated);\n\n function checkHatWearerStatus(\n uint256 _hatId,\n address _wearer\n ) external returns (bool updated);\n\n function renounceHat(uint256 _hatId) external;\n\n function transferHat(uint256 _hatId, address _from, address _to) external;\n\n /*//////////////////////////////////////////////////////////////\n HATS ADMIN FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function makeHatImmutable(uint256 _hatId) external;\n\n function changeHatDetails(\n uint256 _hatId,\n string memory _newDetails\n ) external;\n\n function changeHatEligibility(\n uint256 _hatId,\n address _newEligibility\n ) external;\n\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\n\n function changeHatImageURI(\n uint256 _hatId,\n string memory _newImageURI\n ) external;\n\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\n\n function requestLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat\n ) external;\n\n function approveLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\n\n function relinkTopHatWithinTree(\n uint32 _topHatDomain,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n /*//////////////////////////////////////////////////////////////\n VIEW FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function viewHat(\n uint256 _hatId\n )\n external\n view\n returns (\n string memory details,\n uint32 maxSupply,\n uint32 supply,\n address eligibility,\n address toggle,\n string memory imageURI,\n uint16 lastHatId,\n bool mutable_,\n bool active\n );\n\n function isWearerOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isWearer);\n\n function isAdminOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isAdmin);\n\n function isInGoodStanding(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool standing);\n\n function isEligible(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool eligible);\n\n function getHatEligibilityModule(\n uint256 _hatId\n ) external view returns (address eligibility);\n\n function getHatToggleModule(\n uint256 _hatId\n ) external view returns (address toggle);\n\n function getHatMaxSupply(\n uint256 _hatId\n ) external view returns (uint32 maxSupply);\n\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\n\n function getImageURIForHat(\n uint256 _hatId\n ) external view returns (string memory _uri);\n\n function balanceOf(\n address wearer,\n uint256 hatId\n ) external view returns (uint256 balance);\n\n function balanceOfBatch(\n address[] calldata _wearers,\n uint256[] calldata _hatIds\n ) external view returns (uint256[] memory);\n\n function uri(uint256 id) external view returns (string memory _uri);\n}\n" + }, + "contracts/interfaces/hats/IHatsIdUtilities.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface IHatsIdUtilities {\n function buildHatId(\n uint256 _admin,\n uint16 _newHat\n ) external pure returns (uint256 id);\n\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\n\n function getLocalHatLevel(\n uint256 _hatId\n ) external pure returns (uint32 level);\n\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\n\n function isLocalTopHat(\n uint256 _hatId\n ) external pure returns (bool _localTopHat);\n\n function isValidHatId(\n uint256 _hatId\n ) external view returns (bool validHatId);\n\n function getAdminAtLevel(\n uint256 _hatId,\n uint32 _level\n ) external view returns (uint256 admin);\n\n function getAdminAtLocalLevel(\n uint256 _hatId,\n uint32 _level\n ) external pure returns (uint256 admin);\n\n function getTopHatDomain(\n uint256 _hatId\n ) external view returns (uint32 domain);\n\n function getTippyTopHatDomain(\n uint32 _topHatDomain\n ) external view returns (uint32 domain);\n\n function noCircularLinkage(\n uint32 _topHatDomain,\n uint256 _linkedAdmin\n ) external view returns (bool notCircular);\n\n function sameTippyTopHatDomain(\n uint32 _topHatDomain,\n uint256 _newAdminHat\n ) external view returns (bool sameDomain);\n}\n" + }, + "contracts/mocks/MockHatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport \"../azorius/strategies/HatsProposalCreationWhitelist.sol\";\n\ncontract MockHatsProposalCreationWhitelist is HatsProposalCreationWhitelist {\n function setUp(bytes memory initializeParams) public override initializer {\n __Ownable_init();\n super.setUp(initializeParams);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/mainnet/LinearERC20VotingWithHatsProposalCreation.json b/deployments/mainnet/LinearERC20VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..290e449 --- /dev/null +++ b/deployments/mainnet/LinearERC20VotingWithHatsProposalCreation.json @@ -0,0 +1,1334 @@ +{ + "address": "0xD3Ec453029d9FCdc33d36640aFf250F4ac609B11", + "abi": [ + { + "inputs": [], + "name": "AlreadyVoted", + "type": "error" + }, + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidQuorumNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "requiredProposerWeight", + "type": "uint256" + } + ], + "name": "RequiredProposerWeightUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QUORUM_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votingSupply", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_voter", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getVotingWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governanceToken", + "outputs": [ + { + "internalType": "contract IVotes", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_abstainVotes", + "type": "uint256" + } + ], + "name": "meetsQuorum", + "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": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredProposerWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requiredProposerWeight", + "type": "uint256" + } + ], + "name": "updateRequiredProposerWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x13af2213b30fe373154eb51443707b351930c46a425162b8a43c5757babfbe2b", + "receipt": { + "to": null, + "from": "0xb5Ca125166C1987A35EDD550E16846Fa1e1D9bB3", + "contractAddress": "0xD3Ec453029d9FCdc33d36640aFf250F4ac609B11", + "transactionIndex": 5, + "gasUsed": "1593488", + "logsBloom": "0x00000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000004000000000000200000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x352ca8ab3d68564ae0760c5005ee84c022d77424ac6a5509d10575191ee9cf0a", + "transactionHash": "0x13af2213b30fe373154eb51443707b351930c46a425162b8a43c5757babfbe2b", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 21130150, + "transactionHash": "0x13af2213b30fe373154eb51443707b351930c46a425162b8a43c5757babfbe2b", + "address": "0xD3Ec453029d9FCdc33d36640aFf250F4ac609B11", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 36, + "blockHash": "0x352ca8ab3d68564ae0760c5005ee84c022d77424ac6a5509d10575191ee9cf0a" + } + ], + "blockNumber": 21130150, + "cumulativeGasUsed": "6866619", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyVoted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidQuorumNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"QuorumNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"RequiredProposerWeightUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"QUORUM_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votingSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getVotingWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceToken\",\"outputs\":[{\"internalType\":\"contract IVotes\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_abstainVotes\",\"type\":\"uint256\"}],\"name\":\"meetsQuorum\",\"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\":\"quorumNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"quorumVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredProposerWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"updateQuorumNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"updateRequiredProposerWeight\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getProposalVotingSupply(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"_0\":\"uint256 voting supply snapshot for the given _proposalId\"}},\"getVotingWeight(address,uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\",\"_voter\":\"address of the voter\"},\"returns\":{\"_0\":\"uint256 the address' voting weight\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address)\":{\"params\":{\"_address\":\"address to check\",\"_proposalId\":\"id of the Proposal to check\"},\"returns\":{\"_0\":\"bool true if the address has voted on the Proposal, otherwise false\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"meetsQuorum(uint256,uint256,uint256)\":{\"params\":{\"_abstainVotes\":\"number of votes abstaining\",\"_totalSupply\":\"the total supply of tokens\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the total number of yes votes + abstain meets the quorum\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"quorumVotes(uint32)\":{\"params\":{\"_proposalId\":\"The ID of the proposal to get quorum votes for\"},\"returns\":{\"_0\":\"uint256 The quantity of votes required to meet quorum\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateQuorumNumerator(uint256)\":{\"params\":{\"_quorumNumerator\":\"numerator to use when calculating quorum (over 1,000,000)\"}},\"updateRequiredProposerWeight(uint256)\":{\"params\":{\"_requiredProposerWeight\":\"required token voting weight\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8)\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"errors\":{\"InvalidQuorumNumerator()\":[{\"notice\":\"Ensures the numerator cannot be larger than the denominator. \"}]},\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"QUORUM_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating quorum (1,000,000). \"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getProposalVotingSupply(uint32)\":{\"notice\":\"Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails.\"},\"getVotingWeight(address,uint32)\":{\"notice\":\"Calculates the voting weight an address has for a specific Proposal.\"},\"hasVoted(uint32,address)\":{\"notice\":\"Returns whether an address has voted on the specified Proposal.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"meetsQuorum(uint256,uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes.\"},\"quorumNumerator()\":{\"notice\":\"The numerator to use when calculating quorum (adjustable). \"},\"quorumVotes(uint32)\":{\"notice\":\"Calculates the total number of votes required for a proposal to meet quorum. \"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"requiredProposerWeight()\":{\"notice\":\"Voting weight required to be able to submit Proposals. \"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateQuorumNumerator(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateRequiredProposerWeight(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8)\":{\"notice\":\"Casts votes for a Proposal, equal to the caller's token delegation.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":\"LinearERC20VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/azorius/BaseQuorumPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based quorums.\\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\\n */\\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating quorum (adjustable). */\\n uint256 public quorumNumerator;\\n\\n /** The denominator to use when calculating quorum (1,000,000). */\\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\\n\\n /** Ensures the numerator cannot be larger than the denominator. */\\n error InvalidQuorumNumerator();\\n\\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\\n\\n /** \\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\\n */\\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\\n _updateQuorumNumerator(_quorumNumerator);\\n }\\n\\n /** Internal implementation of `updateQuorumNumerator`. */\\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\\n if (_quorumNumerator > QUORUM_DENOMINATOR)\\n revert InvalidQuorumNumerator();\\n\\n quorumNumerator = _quorumNumerator;\\n\\n emit QuorumNumeratorUpdated(_quorumNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\\n * votes.\\n *\\n * @param _totalSupply the total supply of tokens\\n * @param _yesVotes number of votes in favor\\n * @param _abstainVotes number of votes abstaining\\n * @return bool whether the total number of yes votes + abstain meets the quorum\\n */\\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\\n }\\n\\n /**\\n * Calculates the total number of votes required for a proposal to meet quorum.\\n * \\n * @param _proposalId The ID of the proposal to get quorum votes for\\n * @return uint256 The quantity of votes required to meet quorum\\n */\\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x0218f97766d3b796f72e4ee0e1b267e72ccad8d979dfd14c5699f93d05c64c29\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC20VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IVotes} from \\\"@openzeppelin/contracts/governance/utils/IVotes.sol\\\";\\nimport {BaseStrategy, IBaseStrategy} from \\\"../BaseStrategy.sol\\\";\\nimport {BaseQuorumPercent} from \\\"../BaseQuorumPercent.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\\n *\\n * This contract is an extensible version of LinearERC20Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC20VotingExtensible is\\n BaseStrategy,\\n BaseQuorumPercent,\\n BaseVotingBasisPercent\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\\n }\\n\\n IVotes public governanceToken;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /** Voting weight required to be able to submit Proposals. */\\n uint256 public requiredProposerWeight;\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) internal proposalVotes;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n uint256 weight\\n );\\n\\n error InvalidProposal();\\n error VotingEnded();\\n error AlreadyVoted();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n IVotes _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _requiredProposerWeight,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (address, IVotes, address, uint32, uint256, uint256, uint256)\\n );\\n if (address(_governanceToken) == address(0))\\n revert InvalidTokenAddress();\\n\\n governanceToken = _governanceToken;\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumNumerator(_quorumNumerator);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _requiredProposerWeight required token voting weight\\n */\\n function updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) external virtual onlyOwner {\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n }\\n\\n /**\\n * Casts votes for a Proposal, equal to the caller's token delegation.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n */\\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\\n _vote(\\n _proposalId,\\n msg.sender,\\n _voteType,\\n getVotingWeight(msg.sender, _proposalId)\\n );\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock,\\n uint256 votingSupply\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n votingSupply = getProposalVotingSupply(_proposalId);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /**\\n * Returns whether an address has voted on the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal to check\\n * @param _address address to check\\n * @return bool true if the address has voted on the Proposal, otherwise false\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _address\\n ) public view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_address];\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n meetsQuorum(\\n getProposalVotingSupply(_proposalId),\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].abstainVotes\\n ) && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /**\\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\\n * not when it is being voted on passes / fails.\\n *\\n * @param _proposalId id of the Proposal\\n * @return uint256 voting supply snapshot for the given _proposalId\\n */\\n function getProposalVotingSupply(\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastTotalSupply(\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /**\\n * Calculates the voting weight an address has for a specific Proposal.\\n *\\n * @param _voter address of the voter\\n * @param _proposalId id of the Proposal\\n * @return uint256 the address' voting weight\\n */\\n function getVotingWeight(\\n address _voter,\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastVotes(\\n _voter,\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n return\\n governanceToken.getPastVotes(_address, block.number - 1) >=\\n requiredProposerWeight;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateRequiredProposerWeight`. */\\n function _updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) internal virtual {\\n requiredProposerWeight = _requiredProposerWeight;\\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _weight amount of voting weight cast, typically the\\n * total number of tokens delegated\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n uint256 _weight\\n ) internal virtual {\\n if (proposalVotes[_proposalId].votingEndBlock == 0)\\n revert InvalidProposal();\\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\\n revert VotingEnded();\\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\\n\\n proposalVotes[_proposalId].hasVoted[_voter] = true;\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposalVotes[_proposalId].noVotes += _weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposalVotes[_proposalId].yesVotes += _weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposalVotes[_proposalId].abstainVotes += _weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _weight);\\n }\\n\\n /** @inheritdoc BaseQuorumPercent*/\\n function quorumVotes(\\n uint32 _proposalId\\n ) public view virtual override returns (uint256) {\\n return\\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\\n QUORUM_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x18b46de302f756d61b4a47c65fae9b676a6352490739a643527ea5c0ccc2eea4\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {LinearERC20VotingExtensible} from \\\"./LinearERC20VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC20VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC20VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\\n * `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n {\\n (\\n address _owner,\\n address _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address,\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC20VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _governanceToken,\\n _azoriusModule,\\n _votingPeriod,\\n 0, // requiredProposerWeight is zero because we only care about the hat check\\n _quorumNumerator,\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0xa072c25a19494d97729e7b56dafa7a7b75caa3558620784ffef077af1f2f428a\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611b60806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getProposalVotingSupply(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "_0": "uint256 voting supply snapshot for the given _proposalId" + } + }, + "getVotingWeight(address,uint32)": { + "params": { + "_proposalId": "id of the Proposal", + "_voter": "address of the voter" + }, + "returns": { + "_0": "uint256 the address' voting weight" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address)": { + "params": { + "_address": "address to check", + "_proposalId": "id of the Proposal to check" + }, + "returns": { + "_0": "bool true if the address has voted on the Proposal, otherwise false" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "meetsQuorum(uint256,uint256,uint256)": { + "params": { + "_abstainVotes": "number of votes abstaining", + "_totalSupply": "the total supply of tokens", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the total number of yes votes + abstain meets the quorum" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "quorumVotes(uint32)": { + "params": { + "_proposalId": "The ID of the proposal to get quorum votes for" + }, + "returns": { + "_0": "uint256 The quantity of votes required to meet quorum" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateQuorumNumerator(uint256)": { + "params": { + "_quorumNumerator": "numerator to use when calculating quorum (over 1,000,000)" + } + }, + "updateRequiredProposerWeight(uint256)": { + "params": { + "_requiredProposerWeight": "required token voting weight" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8)": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "errors": { + "InvalidQuorumNumerator()": [ + { + "notice": "Ensures the numerator cannot be larger than the denominator. " + } + ] + }, + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "QUORUM_DENOMINATOR()": { + "notice": "The denominator to use when calculating quorum (1,000,000). " + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getProposalVotingSupply(uint32)": { + "notice": "Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails." + }, + "getVotingWeight(address,uint32)": { + "notice": "Calculates the voting weight an address has for a specific Proposal." + }, + "hasVoted(uint32,address)": { + "notice": "Returns whether an address has voted on the specified Proposal." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "meetsQuorum(uint256,uint256,uint256)": { + "notice": "Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes." + }, + "quorumNumerator()": { + "notice": "The numerator to use when calculating quorum (adjustable). " + }, + "quorumVotes(uint32)": { + "notice": "Calculates the total number of votes required for a proposal to meet quorum. " + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "requiredProposerWeight()": { + "notice": "Voting weight required to be able to submit Proposals. " + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateQuorumNumerator(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateRequiredProposerWeight(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8)": { + "notice": "Casts votes for a Proposal, equal to the caller's token delegation." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 801, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "quorumNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "105", + "type": "t_uint256" + }, + { + "astId": 1629, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "governanceToken", + "offset": 0, + "slot": "106", + "type": "t_contract(IVotes)663" + }, + { + "astId": 1632, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 20, + "slot": "106", + "type": "t_uint32" + }, + { + "astId": 1635, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "requiredProposerWeight", + "offset": 0, + "slot": "107", + "type": "t_uint256" + }, + { + "astId": 1641, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "108", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)" + } + ], + "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_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "t_contract(IVotes)663": { + "encoding": "inplace", + "label": "contract IVotes", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC20VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)1626_storage" + }, + "t_struct(ProposalVotes)1626_storage": { + "encoding": "inplace", + "label": "struct LinearERC20VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 1613, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1615, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1617, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 1619, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 1621, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 1625, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_bool)" + } + ], + "numberOfBytes": "160" + }, + "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/mainnet/LinearERC721VotingWithHatsProposalCreation.json b/deployments/mainnet/LinearERC721VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..0e6a136 --- /dev/null +++ b/deployments/mainnet/LinearERC721VotingWithHatsProposalCreation.json @@ -0,0 +1,1440 @@ +{ + "address": "0x3D3E9F0d3576a520b12A54e6e79BA2314Fe9ce71", + "abi": [ + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdAlreadyVoted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdNotOwned", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParams", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotingWeight", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "TokenAlreadySet", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "GovernanceTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "GovernanceTokenRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposerThreshold", + "type": "uint256" + } + ], + "name": "ProposerThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumThreshold", + "type": "uint256" + } + ], + "name": "QuorumThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "tokenAddresses", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_weight", + "type": "uint256" + } + ], + "name": "addGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllTokenAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "getTokenWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint32", + "name": "votingStartBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposerThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "removeGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokenAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenWeights", + "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": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_proposerThreshold", + "type": "uint256" + } + ], + "name": "updateProposerThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumThreshold", + "type": "uint256" + } + ], + "name": "updateQuorumThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "_tokenAddresses", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x59b348ed974d9c990e5ac63efbab18c3804679db8b8c4f99495914047e2bd112", + "receipt": { + "to": null, + "from": "0xb5Ca125166C1987A35EDD550E16846Fa1e1D9bB3", + "contractAddress": "0x3D3E9F0d3576a520b12A54e6e79BA2314Fe9ce71", + "transactionIndex": 86, + "gasUsed": "1961378", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000200000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2fb1ffcdfed2b703395e16483b2217d609140628665ea207c83298fce2163907", + "transactionHash": "0x59b348ed974d9c990e5ac63efbab18c3804679db8b8c4f99495914047e2bd112", + "logs": [ + { + "transactionIndex": 86, + "blockNumber": 21130151, + "transactionHash": "0x59b348ed974d9c990e5ac63efbab18c3804679db8b8c4f99495914047e2bd112", + "address": "0x3D3E9F0d3576a520b12A54e6e79BA2314Fe9ce71", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 221, + "blockHash": "0x2fb1ffcdfed2b703395e16483b2217d609140628665ea207c83298fce2163907" + } + ], + "blockNumber": 21130151, + "cumulativeGasUsed": "9141790", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdNotOwned\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoVotingWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"GovernanceTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"GovernanceTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"ProposerThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"QuorumThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokenAddresses\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_weight\",\"type\":\"uint256\"}],\"name\":\"addGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllTokenAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalVotes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"votingStartBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposerThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorumThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"removeGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenWeights\",\"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\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"updateProposerThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"updateQuorumThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"_tokenAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"addGovernanceToken(address,uint256)\":{\"params\":{\"_tokenAddress\":\"the address of the ERC-721 token\",\"_weight\":\"the number of votes each NFT id is worth\"}},\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getTokenWeight(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token address\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address,uint256)\":{\"params\":{\"_proposalId\":\"the id of the Proposal\",\"_tokenAddress\":\"the ERC-721 contract address\",\"_tokenId\":\"the unique id of the NFT\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeGovernanceToken(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token to remove\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateProposerThreshold(uint256)\":{\"params\":{\"_proposerThreshold\":\"required voting weight\"}},\"updateQuorumThreshold(uint256)\":{\"params\":{\"_quorumThreshold\":\"total voting weight required to achieve quorum\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8,address[],uint256[])\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_tokenAddresses\":\"list of ERC-721 addresses that correspond to ids in _tokenIds\",\"_tokenIds\":\"list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"addGovernanceToken(address,uint256)\":{\"notice\":\"Adds a new ERC-721 token as a governance token, along with its associated weight.\"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getAllTokenAddresses()\":{\"notice\":\"Returns whole list of governance tokens addresses\"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getTokenWeight(address)\":{\"notice\":\"Returns the current token weight for the given ERC-721 token address.\"},\"hasVoted(uint32,address,uint256)\":{\"notice\":\"Returns whether an NFT id has already voted.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"proposalVotes(uint256)\":{\"notice\":\"`proposalId` to `ProposalVotes`, the voting state of a Proposal. \"},\"proposerThreshold()\":{\"notice\":\"The minimum number of voting power required to create a new proposal.\"},\"quorumThreshold()\":{\"notice\":\"The total number of votes required to achieve quorum. \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this.\"},\"removeGovernanceToken(address)\":{\"notice\":\"Removes the given ERC-721 token address from the list of governance tokens.\"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"tokenAddresses(uint256)\":{\"notice\":\"The list of ERC-721 tokens that can vote. \"},\"tokenWeights(address)\":{\"notice\":\"ERC-721 address to its voting weight per NFT id. \"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateProposerThreshold(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateQuorumThreshold(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8,address[],uint256[])\":{\"notice\":\"Submits a vote on an existing Proposal.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":\"LinearERC721VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"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/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IERC721VotingStrategy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\n/**\\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\\n * voting strategy.\\n */\\ninterface IERC721VotingStrategy {\\n\\n /**\\n * Returns the current token weight for the given ERC-721 token address.\\n *\\n * @param _tokenAddress the ERC-721 token address\\n */\\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa51db3de9ceb151077007952031ac96263b8138c8ae74758f98a4d5bd71fa86c\",\"license\":\"MIT\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC721VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {IERC721VotingStrategy} from \\\"../interfaces/IERC721VotingStrategy.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\nimport {IAzorius} from \\\"../interfaces/IAzorius.sol\\\";\\nimport {BaseStrategy} from \\\"../BaseStrategy.sol\\\";\\n\\n/**\\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\\n * each with their own voting weight.\\n *\\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\\n *\\n * Also, this uses \\\"quorumThreshold\\\" rather than LinearERC20Voting's quorumPercent, because the\\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\\n * \\\"total signers\\\" required, rather than a percentage of the tokens.\\n *\\n * This contract is an extensible version of LinearERC721Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC721VotingExtensible is\\n BaseStrategy,\\n BaseVotingBasisPercent,\\n IERC721VotingStrategy\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n /**\\n * ERC-721 contract address to individual NFT id to bool\\n * of whether it has voted on this proposal.\\n */\\n mapping(address => mapping(uint256 => bool)) hasVoted;\\n }\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) public proposalVotes;\\n\\n /** The list of ERC-721 tokens that can vote. */\\n address[] public tokenAddresses;\\n\\n /** ERC-721 address to its voting weight per NFT id. */\\n mapping(address => uint256) public tokenWeights;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /**\\n * The total number of votes required to achieve quorum.\\n * \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no\\n * totalSupply function, so the contract cannot determine this.\\n */\\n uint256 public quorumThreshold;\\n\\n /**\\n * The minimum number of voting power required to create a new proposal.\\n */\\n uint256 public proposerThreshold;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event QuorumThresholdUpdated(uint256 quorumThreshold);\\n event ProposerThresholdUpdated(uint256 proposerThreshold);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n address[] tokenAddresses,\\n uint256[] tokenIds\\n );\\n event GovernanceTokenAdded(address token, uint256 weight);\\n event GovernanceTokenRemoved(address token);\\n\\n error InvalidParams();\\n error InvalidProposal();\\n error VotingEnded();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n error NoVotingWeight();\\n error TokenAlreadySet();\\n error TokenNotSet();\\n error IdAlreadyVoted(uint256 tokenId);\\n error IdNotOwned(uint256 tokenId);\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _proposerThreshold,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n uint256\\n )\\n );\\n\\n if (_tokens.length != _weights.length) {\\n revert InvalidParams();\\n }\\n\\n for (uint i = 0; i < _tokens.length; ) {\\n _addGovernanceToken(_tokens[i], _weights[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumThreshold(_quorumThreshold);\\n _updateProposerThreshold(_proposerThreshold);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\\n *\\n * @param _tokenAddress the address of the ERC-721 token\\n * @param _weight the number of votes each NFT id is worth\\n */\\n function addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) external virtual onlyOwner {\\n _addGovernanceToken(_tokenAddress, _weight);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumThreshold total voting weight required to achieve quorum\\n */\\n function updateQuorumThreshold(\\n uint256 _quorumThreshold\\n ) external virtual onlyOwner {\\n _updateQuorumThreshold(_quorumThreshold);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _proposerThreshold required voting weight\\n */\\n function updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) external virtual onlyOwner {\\n _updateProposerThreshold(_proposerThreshold);\\n }\\n\\n /**\\n * Returns whole list of governance tokens addresses\\n */\\n function getAllTokenAddresses()\\n external\\n view\\n virtual\\n returns (address[] memory)\\n {\\n return tokenAddresses;\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /**\\n * Submits a vote on an existing Proposal.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function vote(\\n uint32 _proposalId,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) external virtual {\\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\\n }\\n\\n /** @inheritdoc IERC721VotingStrategy*/\\n function getTokenWeight(\\n address _tokenAddress\\n ) external view virtual override returns (uint256) {\\n return tokenWeights[_tokenAddress];\\n }\\n\\n /**\\n * Returns whether an NFT id has already voted.\\n *\\n * @param _proposalId the id of the Proposal\\n * @param _tokenAddress the ERC-721 contract address\\n * @param _tokenId the unique id of the NFT\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _tokenAddress,\\n uint256 _tokenId\\n ) external view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\\n }\\n\\n /**\\n * Removes the given ERC-721 token address from the list of governance tokens.\\n *\\n * @param _tokenAddress the ERC-721 token to remove\\n */\\n function removeGovernanceToken(\\n address _tokenAddress\\n ) external virtual onlyOwner {\\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\\n\\n tokenWeights[_tokenAddress] = 0;\\n\\n uint256 length = tokenAddresses.length;\\n for (uint256 i = 0; i < length; ) {\\n if (_tokenAddress == tokenAddresses[i]) {\\n uint256 last = length - 1;\\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\\n delete tokenAddresses[last]; // delete the last token\\n break;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit GovernanceTokenRemoved(_tokenAddress);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n quorumThreshold <=\\n proposalVotes[_proposalId].yesVotes +\\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n uint256 totalWeight = 0;\\n for (uint i = 0; i < tokenAddresses.length; ) {\\n address tokenAddress = tokenAddresses[i];\\n totalWeight +=\\n IERC721(tokenAddress).balanceOf(_address) *\\n tokenWeights[tokenAddress];\\n unchecked {\\n ++i;\\n }\\n }\\n return totalWeight >= proposerThreshold;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `addGovernanceToken` */\\n function _addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) internal virtual {\\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\\n revert InvalidTokenAddress();\\n\\n if (_weight == 0) revert NoVotingWeight();\\n\\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\\n\\n tokenAddresses.push(_tokenAddress);\\n tokenWeights[_tokenAddress] = _weight;\\n\\n emit GovernanceTokenAdded(_tokenAddress, _weight);\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateQuorumThreshold`. */\\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\\n quorumThreshold = _quorumThreshold;\\n emit QuorumThresholdUpdated(quorumThreshold);\\n }\\n\\n /** Internal implementation of `updateProposerThreshold`. */\\n function _updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) internal virtual {\\n proposerThreshold = _proposerThreshold;\\n emit ProposerThresholdUpdated(_proposerThreshold);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) internal virtual {\\n uint256 weight;\\n\\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\\n // to vote twice if you get more weight later on\\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\\n address tokenAddress = _tokenAddresses[i];\\n uint256 tokenId = _tokenIds[i];\\n\\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\\n revert IdNotOwned(tokenId);\\n }\\n\\n if (\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\\n true\\n ) {\\n revert IdAlreadyVoted(tokenId);\\n }\\n\\n weight += tokenWeights[tokenAddress];\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (weight == 0) revert NoVotingWeight();\\n\\n ProposalVotes storage proposal = proposalVotes[_proposalId];\\n\\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\\n\\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposal.noVotes += weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposal.yesVotes += weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposal.abstainVotes += weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\\n }\\n}\\n\",\"keccak256\":\"0xd4080f58d0b3abe47b825f0b43fc5061143319a93de5ff8752b6591d3effef75\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {LinearERC721VotingExtensible} from \\\"./LinearERC721VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC721VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC721VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC721VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _tokens,\\n _weights,\\n _azoriusModule,\\n _votingPeriod,\\n _quorumThreshold,\\n 0, // _proposerThreshold is zero because we only care about the hat check\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0x78f0f627fe0f63c7d1ae8ec0333f0e55d801412f34b7597b12e9007a23fcd0d7\",\"license\":\"MIT\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61220680620000ee6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "addGovernanceToken(address,uint256)": { + "params": { + "_tokenAddress": "the address of the ERC-721 token", + "_weight": "the number of votes each NFT id is worth" + } + }, + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getTokenWeight(address)": { + "params": { + "_tokenAddress": "the ERC-721 token address" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address,uint256)": { + "params": { + "_proposalId": "the id of the Proposal", + "_tokenAddress": "the ERC-721 contract address", + "_tokenId": "the unique id of the NFT" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "removeGovernanceToken(address)": { + "params": { + "_tokenAddress": "the ERC-721 token to remove" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateProposerThreshold(uint256)": { + "params": { + "_proposerThreshold": "required voting weight" + } + }, + "updateQuorumThreshold(uint256)": { + "params": { + "_quorumThreshold": "total voting weight required to achieve quorum" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8,address[],uint256[])": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_tokenAddresses": "list of ERC-721 addresses that correspond to ids in _tokenIds", + "_tokenIds": "list of unique token ids that correspond to their ERC-721 address in _tokenAddresses", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "addGovernanceToken(address,uint256)": { + "notice": "Adds a new ERC-721 token as a governance token, along with its associated weight." + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getAllTokenAddresses()": { + "notice": "Returns whole list of governance tokens addresses" + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getTokenWeight(address)": { + "notice": "Returns the current token weight for the given ERC-721 token address." + }, + "hasVoted(uint32,address,uint256)": { + "notice": "Returns whether an NFT id has already voted." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "proposalVotes(uint256)": { + "notice": "`proposalId` to `ProposalVotes`, the voting state of a Proposal. " + }, + "proposerThreshold()": { + "notice": "The minimum number of voting power required to create a new proposal." + }, + "quorumThreshold()": { + "notice": "The total number of votes required to achieve quorum. \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this." + }, + "removeGovernanceToken(address)": { + "notice": "Removes the given ERC-721 token address from the list of governance tokens." + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "tokenAddresses(uint256)": { + "notice": "The list of ERC-721 tokens that can vote. " + }, + "tokenWeights(address)": { + "notice": "ERC-721 address to its voting weight per NFT id. " + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateProposerThreshold(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateQuorumThreshold(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8,address[],uint256[])": { + "notice": "Submits a vote on an existing Proposal." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 2378, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)" + }, + { + "astId": 2382, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenAddresses", + "offset": 0, + "slot": "106", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 2387, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenWeights", + "offset": 0, + "slot": "107", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2390, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 0, + "slot": "108", + "type": "t_uint32" + }, + { + "astId": 2393, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "quorumThreshold", + "offset": 0, + "slot": "109", + "type": "t_uint256" + }, + { + "astId": 2396, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposerThreshold", + "offset": 0, + "slot": "110", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "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_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => 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_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC721VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)2372_storage" + }, + "t_struct(ProposalVotes)2372_storage": { + "encoding": "inplace", + "label": "struct LinearERC721VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 2356, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2358, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2360, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2362, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 2364, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2371, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))" + } + ], + "numberOfBytes": "160" + }, + "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/mainnet/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json b/deployments/mainnet/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json new file mode 100644 index 0000000..df3a3a7 --- /dev/null +++ b/deployments/mainnet/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json @@ -0,0 +1,107 @@ +{ + "language": "Solidity", + "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" + }, + "@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/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" + }, + "@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/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/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\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/azorius/BaseQuorumPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based quorums.\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\n */\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating quorum (adjustable). */\n uint256 public quorumNumerator;\n\n /** The denominator to use when calculating quorum (1,000,000). */\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\n\n /** Ensures the numerator cannot be larger than the denominator. */\n error InvalidQuorumNumerator();\n\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\n\n /** \n * Updates the quorum required for future Proposals.\n *\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\n */\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\n _updateQuorumNumerator(_quorumNumerator);\n }\n\n /** Internal implementation of `updateQuorumNumerator`. */\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\n if (_quorumNumerator > QUORUM_DENOMINATOR)\n revert InvalidQuorumNumerator();\n\n quorumNumerator = _quorumNumerator;\n\n emit QuorumNumeratorUpdated(_quorumNumerator);\n }\n\n /**\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\n * votes.\n *\n * @param _totalSupply the total supply of tokens\n * @param _yesVotes number of votes in favor\n * @param _abstainVotes number of votes abstaining\n * @return bool whether the total number of yes votes + abstain meets the quorum\n */\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\n }\n\n /**\n * Calculates the total number of votes required for a proposal to meet quorum.\n * \n * @param _proposalId The ID of the proposal to get quorum votes for\n * @return uint256 The quantity of votes required to meet quorum\n */\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\n}\n" + }, + "contracts/azorius/BaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { IAzorius } from \"./interfaces/IAzorius.sol\";\nimport { IBaseStrategy } from \"./interfaces/IBaseStrategy.sol\";\nimport { FactoryFriendly } from \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * The base abstract contract for all voting strategies in Azorius.\n */\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\n\n event AzoriusSet(address indexed azoriusModule);\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\n\n error OnlyAzorius();\n\n IAzorius public azoriusModule;\n\n /**\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\n */\n modifier onlyAzorius() {\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\n _;\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /** @inheritdoc IBaseStrategy*/\n function setAzorius(address _azoriusModule) external onlyOwner {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n\n /** @inheritdoc IBaseStrategy*/\n function initializeProposal(bytes memory _data) external virtual;\n\n /** @inheritdoc IBaseStrategy*/\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function isProposer(address _address) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\n\n /**\n * Sets the address of the [Azorius](Azorius.md) module contract.\n *\n * @param _azoriusModule address of the Azorius module\n */\n function _setAzorius(address _azoriusModule) internal {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n}\n" + }, + "contracts/azorius/BaseVotingBasisPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based voting basis calculations.\n *\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\n *\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\n * See https://en.wikipedia.org/wiki/Supermajority.\n */\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating basis (adjustable). */\n uint256 public basisNumerator;\n\n /** The denominator to use when calculating basis (1,000,000). */\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\n\n error InvalidBasisNumerator();\n\n event BasisNumeratorUpdated(uint256 basisNumerator);\n\n /**\n * Updates the `basisNumerator` for future Proposals.\n *\n * @param _basisNumerator numerator to use\n */\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\n _updateBasisNumerator(_basisNumerator);\n }\n\n /** Internal implementation of `updateBasisNumerator`. */\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\n revert InvalidBasisNumerator();\n\n basisNumerator = _basisNumerator;\n\n emit BasisNumeratorUpdated(_basisNumerator);\n }\n\n /**\n * Calculates whether a vote meets its basis.\n *\n * @param _yesVotes number of votes in favor\n * @param _noVotes number of votes against\n * @return bool whether the yes votes meets the set basis\n */\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/interfaces/IAzorius.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport { Enum } from \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\n/**\n * The base interface for the Azorius governance Safe module.\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\n *\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\n *\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\n * as customizable as possible.\n *\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\n *\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\n * for the duration of its voting period.\n *\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\n * it cannot yet be executed. This is to allow time for token holders\n * to potentially exit their position, as well as parent DAOs time to\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\n * for the duration of its `timelockPeriod`.\n *\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\n * and can then finally be executed on chain by anyone.\n *\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\n * on the blockchain.\n *\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\n * elapsed will be `EXPIRED`, and can no longer be executed.\n *\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \n * `isPassed` function). For a basic strategy, this would mean it received more \n * NO votes than YES or did not achieve quorum. \n */\ninterface IAzorius {\n\n /** Represents a transaction to perform on the blockchain. */\n struct Transaction {\n address to; // destination address of the transaction\n uint256 value; // amount of ETH to transfer with the transaction\n bytes data; // encoded function call data of the transaction\n Enum.Operation operation; // Operation type, Call or DelegateCall\n }\n\n /** Holds details pertaining to a single proposal. */\n struct Proposal {\n uint32 executionCounter; // count of transactions that have been executed within the proposal\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\n address strategy; // BaseStrategy contract this proposal was created on\n bytes32[] txHashes; // hashes of the transactions that are being proposed\n }\n\n /** The list of states in which a Proposal can be in at any given time. */\n enum ProposalState {\n ACTIVE,\n TIMELOCKED,\n EXECUTABLE,\n EXECUTED,\n EXPIRED,\n FAILED\n }\n\n /**\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\n *\n * Multiple strategies can be enabled, and new Proposals will be able to be\n * created using any of the currently enabled strategies.\n *\n * @param _strategy contract address of the BaseStrategy to be enabled\n */\n function enableStrategy(address _strategy) external;\n\n /**\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\n * @param _strategy address of the BaseStrategy to be removed\n */\n function disableStrategy(address _prevStrategy, address _strategy) external;\n\n /**\n * Updates the `timelockPeriod` for newly created Proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\n */\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\n\n /**\n * Updates the execution period for future Proposals.\n *\n * @param _executionPeriod new execution period (in blocks)\n */\n function updateExecutionPeriod(uint32 _executionPeriod) external;\n\n /**\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\n * New Proposals begin immediately in the `ACTIVE` state.\n *\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \n * but is included in case future strategy contracts have a need for it\n * @param _transactions array of transactions to propose\n * @param _metadata additional data such as a title/description to submit with the proposal\n */\n function submitProposal(\n address _strategy,\n bytes memory _data,\n Transaction[] calldata _transactions,\n string calldata _metadata\n ) external;\n\n /**\n * Executes all transactions within a Proposal.\n * This will only be able to be called if the Proposal passed.\n *\n * @param _proposalId identifier of the Proposal\n * @param _targets target contracts for each transaction\n * @param _values ETH values to be sent with each transaction\n * @param _data transaction data to be executed\n * @param _operations Calls or Delegatecalls\n */\n function executeProposal(\n uint32 _proposalId,\n address[] memory _targets,\n uint256[] memory _values,\n bytes[] memory _data,\n Enum.Operation[] memory _operations\n ) external;\n\n /**\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\n *\n * @param _strategy contract address of the BaseStrategy to check\n * @return bool True if the strategy is enabled, otherwise False\n */\n function isStrategyEnabled(address _strategy) external view returns (bool);\n\n /**\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\n * Because the list of BaseStrategies is technically unbounded, this\n * requires the address of the first strategy you would like, along\n * with the total count of strategies to return, rather than\n * returning the whole list at once.\n *\n * @param _startAddress contract address of the BaseStrategy to start with\n * @param _count maximum number of BaseStrategies that should be returned\n * @return _strategies array of BaseStrategies\n * @return _next next BaseStrategy contract address in the linked list\n */\n function getStrategies(\n address _startAddress,\n uint256 _count\n ) external view returns (address[] memory _strategies, address _next);\n\n /**\n * Gets the state of a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return ProposalState uint256 ProposalState enum value representing the\n * current state of the proposal\n */\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\n\n /**\n * Generates the data for the module transaction hash (required for signing).\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @param _nonce Safe nonce of the transaction\n * @return bytes hashed transaction data\n */\n function generateTxHashData(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation,\n uint256 _nonce\n ) external view returns (bytes memory);\n\n /**\n * Returns the `keccak256` hash of the specified transaction.\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @return bytes32 transaction hash\n */\n function getTxHash(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation\n ) external view returns (bytes32);\n\n /**\n * Returns the hash of a transaction in a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @param _txIndex index of the transaction within the Proposal\n * @return bytes32 hash of the specified transaction\n */\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\n\n /**\n * Returns the transaction hashes associated with a given `proposalId`.\n *\n * @param _proposalId identifier of the Proposal to get transaction hashes for\n * @return bytes32[] array of transaction hashes\n */\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\n\n /**\n * Returns details about the specified Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return _strategy address of the BaseStrategy contract the Proposal is on\n * @return _txHashes hashes of the transactions the Proposal contains\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\n */\n function getProposal(uint32 _proposalId) external view\n returns (\n address _strategy,\n bytes32[] memory _txHashes,\n uint32 _timelockPeriod,\n uint32 _executionPeriod,\n uint32 _executionCounter\n );\n}\n" + }, + "contracts/azorius/interfaces/IBaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\n/**\n * The specification for a voting strategy in Azorius.\n *\n * Each IBaseStrategy implementation need only implement the given functions here,\n * which allows for highly composable but simple or complex voting strategies.\n *\n * It should be noted that while many voting strategies make use of parameters such as\n * voting period or quorum, that is a detail of the individual strategy itself, and not\n * a requirement for the Azorius protocol.\n */\ninterface IBaseStrategy {\n\n /**\n * Sets the address of the [Azorius](../Azorius.md) contract this \n * [BaseStrategy](../BaseStrategy.md) is being used on.\n *\n * @param _azoriusModule address of the Azorius Safe module\n */\n function setAzorius(address _azoriusModule) external;\n\n /**\n * Called by the [Azorius](../Azorius.md) module. This notifies this \n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\n *\n * @param _data arbitrary data to pass to this BaseStrategy\n */\n function initializeProposal(bytes memory _data) external;\n\n /**\n * Returns whether a Proposal has been passed.\n *\n * @param _proposalId proposalId to check\n * @return bool true if the proposal has passed, otherwise false\n */\n function isPassed(uint32 _proposalId) external view returns (bool);\n\n /**\n * Returns whether the specified address can submit a Proposal with\n * this [BaseStrategy](../BaseStrategy.md).\n *\n * This allows a BaseStrategy to place any limits it would like on\n * who can create new Proposals, such as requiring a minimum token\n * delegation.\n *\n * @param _address address to check\n * @return bool true if the address can submit a Proposal, otherwise false\n */\n function isProposer(address _address) external view returns (bool);\n\n /**\n * Returns the block number voting ends on a given Proposal.\n *\n * @param _proposalId proposalId to check\n * @return uint32 block number when voting ends on the Proposal\n */\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\n}\n" + }, + "contracts/azorius/interfaces/IERC721VotingStrategy.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\n/**\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\n * voting strategy.\n */\ninterface IERC721VotingStrategy {\n\n /**\n * Returns the current token weight for the given ERC-721 token address.\n *\n * @param _tokenAddress the ERC-721 token address\n */\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\n}\n" + }, + "contracts/azorius/strategies/HatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\n event HatWhitelisted(uint256 hatId);\n event HatRemovedFromWhitelist(uint256 hatId);\n\n IHats public hatsContract;\n\n /** Array to store whitelisted Hat IDs. */\n uint256[] private whitelistedHatIds;\n\n error InvalidHatsContract();\n error NoHatsWhitelisted();\n error HatAlreadyWhitelisted();\n error HatNotWhitelisted();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters:\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(bytes memory initializeParams) public virtual {\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\n .decode(initializeParams, (address, uint256[]));\n\n if (_hatsContract == address(0)) revert InvalidHatsContract();\n hatsContract = IHats(_hatsContract);\n\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\n _whitelistHat(_initialWhitelistedHats[i]);\n }\n }\n\n /**\n * Adds a Hat to the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to whitelist\n */\n function whitelistHat(uint256 _hatId) external onlyOwner {\n _whitelistHat(_hatId);\n }\n\n /**\n * Internal function to add a Hat to the whitelist.\n * @param _hatId The ID of the Hat to whitelist\n */\n function _whitelistHat(uint256 _hatId) internal {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\n }\n whitelistedHatIds.push(_hatId);\n emit HatWhitelisted(_hatId);\n }\n\n /**\n * Removes a Hat from the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to remove from the whitelist\n */\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\n bool found = false;\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) {\n whitelistedHatIds[i] = whitelistedHatIds[\n whitelistedHatIds.length - 1\n ];\n whitelistedHatIds.pop();\n found = true;\n break;\n }\n }\n if (!found) revert HatNotWhitelisted();\n\n emit HatRemovedFromWhitelist(_hatId);\n }\n\n /**\n * @dev Checks if an address is authorized to create proposals.\n * @param _address The address to check for proposal creation authorization.\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\n * @notice This function overrides the isProposer function from the parent contract.\n * It iterates through all whitelisted Hat IDs and checks if the given address\n * is wearing any of them using the Hats Protocol.\n */\n function isProposer(address _address) public view virtual returns (bool) {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @dev Returns the IDs of all whitelisted Hats.\n * @return uint256[] memory An array of whitelisted Hat IDs.\n */\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\n return whitelistedHatIds;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IVotes} from \"@openzeppelin/contracts/governance/utils/IVotes.sol\";\nimport {BaseStrategy, IBaseStrategy} from \"../BaseStrategy.sol\";\nimport {BaseQuorumPercent} from \"../BaseQuorumPercent.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\n *\n * This contract is an extensible version of LinearERC20Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC20VotingExtensible is\n BaseStrategy,\n BaseQuorumPercent,\n BaseVotingBasisPercent\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\n }\n\n IVotes public governanceToken;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /** Voting weight required to be able to submit Proposals. */\n uint256 public requiredProposerWeight;\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) internal proposalVotes;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n uint256 weight\n );\n\n error InvalidProposal();\n error VotingEnded();\n error AlreadyVoted();\n error InvalidVote();\n error InvalidTokenAddress();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n IVotes _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _requiredProposerWeight,\n uint256 _quorumNumerator,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (address, IVotes, address, uint32, uint256, uint256, uint256)\n );\n if (address(_governanceToken) == address(0))\n revert InvalidTokenAddress();\n\n governanceToken = _governanceToken;\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumNumerator(_quorumNumerator);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n _updateRequiredProposerWeight(_requiredProposerWeight);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _requiredProposerWeight required token voting weight\n */\n function updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) external virtual onlyOwner {\n _updateRequiredProposerWeight(_requiredProposerWeight);\n }\n\n /**\n * Casts votes for a Proposal, equal to the caller's token delegation.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n */\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\n _vote(\n _proposalId,\n msg.sender,\n _voteType,\n getVotingWeight(msg.sender, _proposalId)\n );\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock,\n uint256 votingSupply\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n votingSupply = getProposalVotingSupply(_proposalId);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /**\n * Returns whether an address has voted on the specified Proposal.\n *\n * @param _proposalId id of the Proposal to check\n * @param _address address to check\n * @return bool true if the address has voted on the Proposal, otherwise false\n */\n function hasVoted(\n uint32 _proposalId,\n address _address\n ) public view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_address];\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n meetsQuorum(\n getProposalVotingSupply(_proposalId),\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].abstainVotes\n ) && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /**\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\n * not when it is being voted on passes / fails.\n *\n * @param _proposalId id of the Proposal\n * @return uint256 voting supply snapshot for the given _proposalId\n */\n function getProposalVotingSupply(\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastTotalSupply(\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /**\n * Calculates the voting weight an address has for a specific Proposal.\n *\n * @param _voter address of the voter\n * @param _proposalId id of the Proposal\n * @return uint256 the address' voting weight\n */\n function getVotingWeight(\n address _voter,\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastVotes(\n _voter,\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n return\n governanceToken.getPastVotes(_address, block.number - 1) >=\n requiredProposerWeight;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateRequiredProposerWeight`. */\n function _updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) internal virtual {\n requiredProposerWeight = _requiredProposerWeight;\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _weight amount of voting weight cast, typically the\n * total number of tokens delegated\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n uint256 _weight\n ) internal virtual {\n if (proposalVotes[_proposalId].votingEndBlock == 0)\n revert InvalidProposal();\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\n revert VotingEnded();\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\n\n proposalVotes[_proposalId].hasVoted[_voter] = true;\n\n if (_voteType == uint8(VoteType.NO)) {\n proposalVotes[_proposalId].noVotes += _weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposalVotes[_proposalId].yesVotes += _weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposalVotes[_proposalId].abstainVotes += _weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _weight);\n }\n\n /** @inheritdoc BaseQuorumPercent*/\n function quorumVotes(\n uint32 _proposalId\n ) public view virtual override returns (uint256) {\n return\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\n QUORUM_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {LinearERC20VotingExtensible} from \"./LinearERC20VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC20VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC20VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\n * `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n {\n (\n address _owner,\n address _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumNumerator,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address,\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC20VotingExtensible.setUp(\n abi.encode(\n _owner,\n _governanceToken,\n _azoriusModule,\n _votingPeriod,\n 0, // requiredProposerWeight is zero because we only care about the hat check\n _quorumNumerator,\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {IERC721VotingStrategy} from \"../interfaces/IERC721VotingStrategy.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\nimport {IAzorius} from \"../interfaces/IAzorius.sol\";\nimport {BaseStrategy} from \"../BaseStrategy.sol\";\n\n/**\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\n * each with their own voting weight.\n *\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\n *\n * Also, this uses \"quorumThreshold\" rather than LinearERC20Voting's quorumPercent, because the\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\n * \"total signers\" required, rather than a percentage of the tokens.\n *\n * This contract is an extensible version of LinearERC721Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC721VotingExtensible is\n BaseStrategy,\n BaseVotingBasisPercent,\n IERC721VotingStrategy\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n /**\n * ERC-721 contract address to individual NFT id to bool\n * of whether it has voted on this proposal.\n */\n mapping(address => mapping(uint256 => bool)) hasVoted;\n }\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) public proposalVotes;\n\n /** The list of ERC-721 tokens that can vote. */\n address[] public tokenAddresses;\n\n /** ERC-721 address to its voting weight per NFT id. */\n mapping(address => uint256) public tokenWeights;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /**\n * The total number of votes required to achieve quorum.\n * \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no\n * totalSupply function, so the contract cannot determine this.\n */\n uint256 public quorumThreshold;\n\n /**\n * The minimum number of voting power required to create a new proposal.\n */\n uint256 public proposerThreshold;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event QuorumThresholdUpdated(uint256 quorumThreshold);\n event ProposerThresholdUpdated(uint256 proposerThreshold);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n address[] tokenAddresses,\n uint256[] tokenIds\n );\n event GovernanceTokenAdded(address token, uint256 weight);\n event GovernanceTokenRemoved(address token);\n\n error InvalidParams();\n error InvalidProposal();\n error VotingEnded();\n error InvalidVote();\n error InvalidTokenAddress();\n error NoVotingWeight();\n error TokenAlreadySet();\n error TokenNotSet();\n error IdAlreadyVoted(uint256 tokenId);\n error IdNotOwned(uint256 tokenId);\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _proposerThreshold,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n uint256\n )\n );\n\n if (_tokens.length != _weights.length) {\n revert InvalidParams();\n }\n\n for (uint i = 0; i < _tokens.length; ) {\n _addGovernanceToken(_tokens[i], _weights[i]);\n unchecked {\n ++i;\n }\n }\n\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumThreshold(_quorumThreshold);\n _updateProposerThreshold(_proposerThreshold);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\n *\n * @param _tokenAddress the address of the ERC-721 token\n * @param _weight the number of votes each NFT id is worth\n */\n function addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) external virtual onlyOwner {\n _addGovernanceToken(_tokenAddress, _weight);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the quorum required for future Proposals.\n *\n * @param _quorumThreshold total voting weight required to achieve quorum\n */\n function updateQuorumThreshold(\n uint256 _quorumThreshold\n ) external virtual onlyOwner {\n _updateQuorumThreshold(_quorumThreshold);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _proposerThreshold required voting weight\n */\n function updateProposerThreshold(\n uint256 _proposerThreshold\n ) external virtual onlyOwner {\n _updateProposerThreshold(_proposerThreshold);\n }\n\n /**\n * Returns whole list of governance tokens addresses\n */\n function getAllTokenAddresses()\n external\n view\n virtual\n returns (address[] memory)\n {\n return tokenAddresses;\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n }\n\n /**\n * Submits a vote on an existing Proposal.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function vote(\n uint32 _proposalId,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) external virtual {\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\n }\n\n /** @inheritdoc IERC721VotingStrategy*/\n function getTokenWeight(\n address _tokenAddress\n ) external view virtual override returns (uint256) {\n return tokenWeights[_tokenAddress];\n }\n\n /**\n * Returns whether an NFT id has already voted.\n *\n * @param _proposalId the id of the Proposal\n * @param _tokenAddress the ERC-721 contract address\n * @param _tokenId the unique id of the NFT\n */\n function hasVoted(\n uint32 _proposalId,\n address _tokenAddress,\n uint256 _tokenId\n ) external view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\n }\n\n /**\n * Removes the given ERC-721 token address from the list of governance tokens.\n *\n * @param _tokenAddress the ERC-721 token to remove\n */\n function removeGovernanceToken(\n address _tokenAddress\n ) external virtual onlyOwner {\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\n\n tokenWeights[_tokenAddress] = 0;\n\n uint256 length = tokenAddresses.length;\n for (uint256 i = 0; i < length; ) {\n if (_tokenAddress == tokenAddresses[i]) {\n uint256 last = length - 1;\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\n delete tokenAddresses[last]; // delete the last token\n break;\n }\n unchecked {\n ++i;\n }\n }\n\n emit GovernanceTokenRemoved(_tokenAddress);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n quorumThreshold <=\n proposalVotes[_proposalId].yesVotes +\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n uint256 totalWeight = 0;\n for (uint i = 0; i < tokenAddresses.length; ) {\n address tokenAddress = tokenAddresses[i];\n totalWeight +=\n IERC721(tokenAddress).balanceOf(_address) *\n tokenWeights[tokenAddress];\n unchecked {\n ++i;\n }\n }\n return totalWeight >= proposerThreshold;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `addGovernanceToken` */\n function _addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) internal virtual {\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\n revert InvalidTokenAddress();\n\n if (_weight == 0) revert NoVotingWeight();\n\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\n\n tokenAddresses.push(_tokenAddress);\n tokenWeights[_tokenAddress] = _weight;\n\n emit GovernanceTokenAdded(_tokenAddress, _weight);\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateQuorumThreshold`. */\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\n quorumThreshold = _quorumThreshold;\n emit QuorumThresholdUpdated(quorumThreshold);\n }\n\n /** Internal implementation of `updateProposerThreshold`. */\n function _updateProposerThreshold(\n uint256 _proposerThreshold\n ) internal virtual {\n proposerThreshold = _proposerThreshold;\n emit ProposerThresholdUpdated(_proposerThreshold);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) internal virtual {\n uint256 weight;\n\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\n // to vote twice if you get more weight later on\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\n address tokenAddress = _tokenAddresses[i];\n uint256 tokenId = _tokenIds[i];\n\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\n revert IdNotOwned(tokenId);\n }\n\n if (\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\n true\n ) {\n revert IdAlreadyVoted(tokenId);\n }\n\n weight += tokenWeights[tokenAddress];\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\n unchecked {\n ++i;\n }\n }\n\n if (weight == 0) revert NoVotingWeight();\n\n ProposalVotes storage proposal = proposalVotes[_proposalId];\n\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\n\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\n\n if (_voteType == uint8(VoteType.NO)) {\n proposal.noVotes += weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposal.yesVotes += weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposal.abstainVotes += weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {LinearERC721VotingExtensible} from \"./LinearERC721VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC721VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC721VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC721VotingExtensible.setUp(\n abi.encode(\n _owner,\n _tokens,\n _weights,\n _azoriusModule,\n _votingPeriod,\n _quorumThreshold,\n 0, // _proposerThreshold is zero because we only care about the hat check\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/interfaces/hats/HatsErrors.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsErrors {\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\n error NotAdmin(address user, uint256 hatId);\n\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\n error NotHatWearer();\n\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\n error NotAdminOrWearer();\n\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\n error AllHatsWorn(uint256 hatId);\n\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\n error MaxLevelsReached();\n\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\n error InvalidHatId();\n\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\n error AlreadyWearingHat(address wearer, uint256 hatId);\n\n /// @notice Emitted when attempting to mint a non-existant hat\n error HatDoesNotExist(uint256 hatId);\n\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\n error HatNotActive();\n\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\n error NotEligible();\n\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\n error NotHatsToggle();\n\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\n error NotHatsEligibility();\n\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\n error BatchArrayLengthMismatch();\n\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\n error Immutable();\n\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\n error NewMaxSupplyTooLow();\n\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\n error CircularLinkage();\n\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\n error CrossTreeLinkage();\n\n /// @notice Emitted when attempting to link a tophat without a request\n error LinkageNotRequested();\n\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\n /// @dev This ensures that unlinking never results in a bricked tophat\n error InvalidUnlink();\n\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\n error ZeroAddress();\n\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\n error StringTooLong();\n}\n" + }, + "contracts/interfaces/hats/HatsEvents.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsEvents {\n /// @notice Emitted when a new hat is created\n /// @param id The id for the new hat\n /// @param details A description of the Hat\n /// @param maxSupply The total instances of the Hat that can be worn at once\n /// @param eligibility The address that can report on the Hat wearer's status\n /// @param toggle The address that can deactivate the Hat\n /// @param mutable_ Whether the hat's properties are changeable after creation\n /// @param imageURI The image uri for this hat and the fallback for its\n event HatCreated(\n uint256 id,\n string details,\n uint32 maxSupply,\n address eligibility,\n address toggle,\n bool mutable_,\n string imageURI\n );\n\n /// @notice Emitted when a hat wearer's standing is updated\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\n /// @param hatId The id of the wearer's hat\n /// @param wearer The wearer's address\n /// @param wearerStanding Whether the wearer is in good standing for the hat\n event WearerStandingChanged(\n uint256 hatId,\n address wearer,\n bool wearerStanding\n );\n\n /// @notice Emitted when a hat's status is updated\n /// @param hatId The id of the hat\n /// @param newStatus Whether the hat is active\n event HatStatusChanged(uint256 hatId, bool newStatus);\n\n /// @notice Emitted when a hat's details are updated\n /// @param hatId The id of the hat\n /// @param newDetails The updated details\n event HatDetailsChanged(uint256 hatId, string newDetails);\n\n /// @notice Emitted when a hat's eligibility module is updated\n /// @param hatId The id of the hat\n /// @param newEligibility The updated eligibiliy module\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\n\n /// @notice Emitted when a hat's toggle module is updated\n /// @param hatId The id of the hat\n /// @param newToggle The updated toggle module\n event HatToggleChanged(uint256 hatId, address newToggle);\n\n /// @notice Emitted when a hat's mutability is updated\n /// @param hatId The id of the hat\n event HatMutabilityChanged(uint256 hatId);\n\n /// @notice Emitted when a hat's maximum supply is updated\n /// @param hatId The id of the hat\n /// @param newMaxSupply The updated max supply\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\n\n /// @notice Emitted when a hat's image URI is updated\n /// @param hatId The id of the hat\n /// @param newImageURI The updated image URI\n event HatImageURIChanged(uint256 hatId, string newImageURI);\n\n /// @notice Emitted when a tophat linkage is requested by its admin\n /// @param domain The domain of the tree tophat to link\n /// @param newAdmin The tophat's would-be admin in the parent tree\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\n\n /// @notice Emitted when a tophat is linked to a another tree\n /// @param domain The domain of the newly-linked tophat\n /// @param newAdmin The tophat's new admin in the parent tree\n event TopHatLinked(uint32 domain, uint256 newAdmin);\n}\n" + }, + "contracts/interfaces/hats/IHats.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\nimport \"./IHatsIdUtilities.sol\";\nimport \"./HatsErrors.sol\";\nimport \"./HatsEvents.sol\";\n\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\n function mintTopHat(\n address _target,\n string memory _details,\n string memory _imageURI\n ) external returns (uint256 topHatId);\n\n function createHat(\n uint256 _admin,\n string calldata _details,\n uint32 _maxSupply,\n address _eligibility,\n address _toggle,\n bool _mutable,\n string calldata _imageURI\n ) external returns (uint256 newHatId);\n\n function batchCreateHats(\n uint256[] calldata _admins,\n string[] calldata _details,\n uint32[] calldata _maxSupplies,\n address[] memory _eligibilityModules,\n address[] memory _toggleModules,\n bool[] calldata _mutables,\n string[] calldata _imageURIs\n ) external returns (bool success);\n\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\n\n function mintHat(\n uint256 _hatId,\n address _wearer\n ) external returns (bool success);\n\n function batchMintHats(\n uint256[] calldata _hatIds,\n address[] calldata _wearers\n ) external returns (bool success);\n\n function setHatStatus(\n uint256 _hatId,\n bool _newStatus\n ) external returns (bool toggled);\n\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\n\n function setHatWearerStatus(\n uint256 _hatId,\n address _wearer,\n bool _eligible,\n bool _standing\n ) external returns (bool updated);\n\n function checkHatWearerStatus(\n uint256 _hatId,\n address _wearer\n ) external returns (bool updated);\n\n function renounceHat(uint256 _hatId) external;\n\n function transferHat(uint256 _hatId, address _from, address _to) external;\n\n /*//////////////////////////////////////////////////////////////\n HATS ADMIN FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function makeHatImmutable(uint256 _hatId) external;\n\n function changeHatDetails(\n uint256 _hatId,\n string memory _newDetails\n ) external;\n\n function changeHatEligibility(\n uint256 _hatId,\n address _newEligibility\n ) external;\n\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\n\n function changeHatImageURI(\n uint256 _hatId,\n string memory _newImageURI\n ) external;\n\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\n\n function requestLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat\n ) external;\n\n function approveLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\n\n function relinkTopHatWithinTree(\n uint32 _topHatDomain,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n /*//////////////////////////////////////////////////////////////\n VIEW FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function viewHat(\n uint256 _hatId\n )\n external\n view\n returns (\n string memory details,\n uint32 maxSupply,\n uint32 supply,\n address eligibility,\n address toggle,\n string memory imageURI,\n uint16 lastHatId,\n bool mutable_,\n bool active\n );\n\n function isWearerOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isWearer);\n\n function isAdminOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isAdmin);\n\n function isInGoodStanding(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool standing);\n\n function isEligible(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool eligible);\n\n function getHatEligibilityModule(\n uint256 _hatId\n ) external view returns (address eligibility);\n\n function getHatToggleModule(\n uint256 _hatId\n ) external view returns (address toggle);\n\n function getHatMaxSupply(\n uint256 _hatId\n ) external view returns (uint32 maxSupply);\n\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\n\n function getImageURIForHat(\n uint256 _hatId\n ) external view returns (string memory _uri);\n\n function balanceOf(\n address wearer,\n uint256 hatId\n ) external view returns (uint256 balance);\n\n function balanceOfBatch(\n address[] calldata _wearers,\n uint256[] calldata _hatIds\n ) external view returns (uint256[] memory);\n\n function uri(uint256 id) external view returns (string memory _uri);\n}\n" + }, + "contracts/interfaces/hats/IHatsIdUtilities.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface IHatsIdUtilities {\n function buildHatId(\n uint256 _admin,\n uint16 _newHat\n ) external pure returns (uint256 id);\n\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\n\n function getLocalHatLevel(\n uint256 _hatId\n ) external pure returns (uint32 level);\n\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\n\n function isLocalTopHat(\n uint256 _hatId\n ) external pure returns (bool _localTopHat);\n\n function isValidHatId(\n uint256 _hatId\n ) external view returns (bool validHatId);\n\n function getAdminAtLevel(\n uint256 _hatId,\n uint32 _level\n ) external view returns (uint256 admin);\n\n function getAdminAtLocalLevel(\n uint256 _hatId,\n uint32 _level\n ) external pure returns (uint256 admin);\n\n function getTopHatDomain(\n uint256 _hatId\n ) external view returns (uint32 domain);\n\n function getTippyTopHatDomain(\n uint32 _topHatDomain\n ) external view returns (uint32 domain);\n\n function noCircularLinkage(\n uint32 _topHatDomain,\n uint256 _linkedAdmin\n ) external view returns (bool notCircular);\n\n function sameTippyTopHatDomain(\n uint32 _topHatDomain,\n uint256 _newAdminHat\n ) external view returns (bool sameDomain);\n}\n" + }, + "contracts/mocks/MockHatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport \"../azorius/strategies/HatsProposalCreationWhitelist.sol\";\n\ncontract MockHatsProposalCreationWhitelist is HatsProposalCreationWhitelist {\n function setUp(bytes memory initializeParams) public override initializer {\n __Ownable_init();\n super.setUp(initializeParams);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/optimism/LinearERC20VotingWithHatsProposalCreation.json b/deployments/optimism/LinearERC20VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..72c18da --- /dev/null +++ b/deployments/optimism/LinearERC20VotingWithHatsProposalCreation.json @@ -0,0 +1,1334 @@ +{ + "address": "0x6DC755EDe0faA526b06fb21DccaA64f3c218fa0a", + "abi": [ + { + "inputs": [], + "name": "AlreadyVoted", + "type": "error" + }, + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidQuorumNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "requiredProposerWeight", + "type": "uint256" + } + ], + "name": "RequiredProposerWeightUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QUORUM_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votingSupply", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_voter", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getVotingWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governanceToken", + "outputs": [ + { + "internalType": "contract IVotes", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_abstainVotes", + "type": "uint256" + } + ], + "name": "meetsQuorum", + "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": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredProposerWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requiredProposerWeight", + "type": "uint256" + } + ], + "name": "updateRequiredProposerWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xc1bbb5f8bb057fb2615bab332334737352ae7c927a19830843a4485b12d96b24", + "receipt": { + "to": null, + "from": "0xb5Ca125166C1987A35EDD550E16846Fa1e1D9bB3", + "contractAddress": "0x6DC755EDe0faA526b06fb21DccaA64f3c218fa0a", + "transactionIndex": 9, + "gasUsed": "1593488", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000400000000000000000000000000000000000000000000000040000000000000000000000200000020000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd6eaf3edd340b9a960d9abc06e34bbd5b8ffd7b98a91aba32fef4707ff1c980f", + "transactionHash": "0xc1bbb5f8bb057fb2615bab332334737352ae7c927a19830843a4485b12d96b24", + "logs": [ + { + "transactionIndex": 9, + "blockNumber": 127658059, + "transactionHash": "0xc1bbb5f8bb057fb2615bab332334737352ae7c927a19830843a4485b12d96b24", + "address": "0x6DC755EDe0faA526b06fb21DccaA64f3c218fa0a", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 51, + "blockHash": "0xd6eaf3edd340b9a960d9abc06e34bbd5b8ffd7b98a91aba32fef4707ff1c980f" + } + ], + "blockNumber": 127658059, + "cumulativeGasUsed": "3238307", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyVoted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidQuorumNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"QuorumNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"RequiredProposerWeightUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"QUORUM_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votingSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getVotingWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceToken\",\"outputs\":[{\"internalType\":\"contract IVotes\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_abstainVotes\",\"type\":\"uint256\"}],\"name\":\"meetsQuorum\",\"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\":\"quorumNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"quorumVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredProposerWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"updateQuorumNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"updateRequiredProposerWeight\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getProposalVotingSupply(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"_0\":\"uint256 voting supply snapshot for the given _proposalId\"}},\"getVotingWeight(address,uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\",\"_voter\":\"address of the voter\"},\"returns\":{\"_0\":\"uint256 the address' voting weight\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address)\":{\"params\":{\"_address\":\"address to check\",\"_proposalId\":\"id of the Proposal to check\"},\"returns\":{\"_0\":\"bool true if the address has voted on the Proposal, otherwise false\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"meetsQuorum(uint256,uint256,uint256)\":{\"params\":{\"_abstainVotes\":\"number of votes abstaining\",\"_totalSupply\":\"the total supply of tokens\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the total number of yes votes + abstain meets the quorum\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"quorumVotes(uint32)\":{\"params\":{\"_proposalId\":\"The ID of the proposal to get quorum votes for\"},\"returns\":{\"_0\":\"uint256 The quantity of votes required to meet quorum\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateQuorumNumerator(uint256)\":{\"params\":{\"_quorumNumerator\":\"numerator to use when calculating quorum (over 1,000,000)\"}},\"updateRequiredProposerWeight(uint256)\":{\"params\":{\"_requiredProposerWeight\":\"required token voting weight\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8)\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"errors\":{\"InvalidQuorumNumerator()\":[{\"notice\":\"Ensures the numerator cannot be larger than the denominator. \"}]},\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"QUORUM_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating quorum (1,000,000). \"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getProposalVotingSupply(uint32)\":{\"notice\":\"Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails.\"},\"getVotingWeight(address,uint32)\":{\"notice\":\"Calculates the voting weight an address has for a specific Proposal.\"},\"hasVoted(uint32,address)\":{\"notice\":\"Returns whether an address has voted on the specified Proposal.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"meetsQuorum(uint256,uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes.\"},\"quorumNumerator()\":{\"notice\":\"The numerator to use when calculating quorum (adjustable). \"},\"quorumVotes(uint32)\":{\"notice\":\"Calculates the total number of votes required for a proposal to meet quorum. \"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"requiredProposerWeight()\":{\"notice\":\"Voting weight required to be able to submit Proposals. \"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateQuorumNumerator(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateRequiredProposerWeight(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8)\":{\"notice\":\"Casts votes for a Proposal, equal to the caller's token delegation.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":\"LinearERC20VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/azorius/BaseQuorumPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based quorums.\\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\\n */\\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating quorum (adjustable). */\\n uint256 public quorumNumerator;\\n\\n /** The denominator to use when calculating quorum (1,000,000). */\\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\\n\\n /** Ensures the numerator cannot be larger than the denominator. */\\n error InvalidQuorumNumerator();\\n\\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\\n\\n /** \\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\\n */\\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\\n _updateQuorumNumerator(_quorumNumerator);\\n }\\n\\n /** Internal implementation of `updateQuorumNumerator`. */\\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\\n if (_quorumNumerator > QUORUM_DENOMINATOR)\\n revert InvalidQuorumNumerator();\\n\\n quorumNumerator = _quorumNumerator;\\n\\n emit QuorumNumeratorUpdated(_quorumNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\\n * votes.\\n *\\n * @param _totalSupply the total supply of tokens\\n * @param _yesVotes number of votes in favor\\n * @param _abstainVotes number of votes abstaining\\n * @return bool whether the total number of yes votes + abstain meets the quorum\\n */\\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\\n }\\n\\n /**\\n * Calculates the total number of votes required for a proposal to meet quorum.\\n * \\n * @param _proposalId The ID of the proposal to get quorum votes for\\n * @return uint256 The quantity of votes required to meet quorum\\n */\\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x0218f97766d3b796f72e4ee0e1b267e72ccad8d979dfd14c5699f93d05c64c29\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC20VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IVotes} from \\\"@openzeppelin/contracts/governance/utils/IVotes.sol\\\";\\nimport {BaseStrategy, IBaseStrategy} from \\\"../BaseStrategy.sol\\\";\\nimport {BaseQuorumPercent} from \\\"../BaseQuorumPercent.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\\n *\\n * This contract is an extensible version of LinearERC20Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC20VotingExtensible is\\n BaseStrategy,\\n BaseQuorumPercent,\\n BaseVotingBasisPercent\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\\n }\\n\\n IVotes public governanceToken;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /** Voting weight required to be able to submit Proposals. */\\n uint256 public requiredProposerWeight;\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) internal proposalVotes;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n uint256 weight\\n );\\n\\n error InvalidProposal();\\n error VotingEnded();\\n error AlreadyVoted();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n IVotes _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _requiredProposerWeight,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (address, IVotes, address, uint32, uint256, uint256, uint256)\\n );\\n if (address(_governanceToken) == address(0))\\n revert InvalidTokenAddress();\\n\\n governanceToken = _governanceToken;\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumNumerator(_quorumNumerator);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _requiredProposerWeight required token voting weight\\n */\\n function updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) external virtual onlyOwner {\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n }\\n\\n /**\\n * Casts votes for a Proposal, equal to the caller's token delegation.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n */\\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\\n _vote(\\n _proposalId,\\n msg.sender,\\n _voteType,\\n getVotingWeight(msg.sender, _proposalId)\\n );\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock,\\n uint256 votingSupply\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n votingSupply = getProposalVotingSupply(_proposalId);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /**\\n * Returns whether an address has voted on the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal to check\\n * @param _address address to check\\n * @return bool true if the address has voted on the Proposal, otherwise false\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _address\\n ) public view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_address];\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n meetsQuorum(\\n getProposalVotingSupply(_proposalId),\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].abstainVotes\\n ) && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /**\\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\\n * not when it is being voted on passes / fails.\\n *\\n * @param _proposalId id of the Proposal\\n * @return uint256 voting supply snapshot for the given _proposalId\\n */\\n function getProposalVotingSupply(\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastTotalSupply(\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /**\\n * Calculates the voting weight an address has for a specific Proposal.\\n *\\n * @param _voter address of the voter\\n * @param _proposalId id of the Proposal\\n * @return uint256 the address' voting weight\\n */\\n function getVotingWeight(\\n address _voter,\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastVotes(\\n _voter,\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n return\\n governanceToken.getPastVotes(_address, block.number - 1) >=\\n requiredProposerWeight;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateRequiredProposerWeight`. */\\n function _updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) internal virtual {\\n requiredProposerWeight = _requiredProposerWeight;\\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _weight amount of voting weight cast, typically the\\n * total number of tokens delegated\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n uint256 _weight\\n ) internal virtual {\\n if (proposalVotes[_proposalId].votingEndBlock == 0)\\n revert InvalidProposal();\\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\\n revert VotingEnded();\\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\\n\\n proposalVotes[_proposalId].hasVoted[_voter] = true;\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposalVotes[_proposalId].noVotes += _weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposalVotes[_proposalId].yesVotes += _weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposalVotes[_proposalId].abstainVotes += _weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _weight);\\n }\\n\\n /** @inheritdoc BaseQuorumPercent*/\\n function quorumVotes(\\n uint32 _proposalId\\n ) public view virtual override returns (uint256) {\\n return\\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\\n QUORUM_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x18b46de302f756d61b4a47c65fae9b676a6352490739a643527ea5c0ccc2eea4\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {LinearERC20VotingExtensible} from \\\"./LinearERC20VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC20VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC20VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\\n * `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n {\\n (\\n address _owner,\\n address _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address,\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC20VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _governanceToken,\\n _azoriusModule,\\n _votingPeriod,\\n 0, // requiredProposerWeight is zero because we only care about the hat check\\n _quorumNumerator,\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0xa072c25a19494d97729e7b56dafa7a7b75caa3558620784ffef077af1f2f428a\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611b60806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getProposalVotingSupply(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "_0": "uint256 voting supply snapshot for the given _proposalId" + } + }, + "getVotingWeight(address,uint32)": { + "params": { + "_proposalId": "id of the Proposal", + "_voter": "address of the voter" + }, + "returns": { + "_0": "uint256 the address' voting weight" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address)": { + "params": { + "_address": "address to check", + "_proposalId": "id of the Proposal to check" + }, + "returns": { + "_0": "bool true if the address has voted on the Proposal, otherwise false" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "meetsQuorum(uint256,uint256,uint256)": { + "params": { + "_abstainVotes": "number of votes abstaining", + "_totalSupply": "the total supply of tokens", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the total number of yes votes + abstain meets the quorum" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "quorumVotes(uint32)": { + "params": { + "_proposalId": "The ID of the proposal to get quorum votes for" + }, + "returns": { + "_0": "uint256 The quantity of votes required to meet quorum" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateQuorumNumerator(uint256)": { + "params": { + "_quorumNumerator": "numerator to use when calculating quorum (over 1,000,000)" + } + }, + "updateRequiredProposerWeight(uint256)": { + "params": { + "_requiredProposerWeight": "required token voting weight" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8)": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "errors": { + "InvalidQuorumNumerator()": [ + { + "notice": "Ensures the numerator cannot be larger than the denominator. " + } + ] + }, + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "QUORUM_DENOMINATOR()": { + "notice": "The denominator to use when calculating quorum (1,000,000). " + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getProposalVotingSupply(uint32)": { + "notice": "Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails." + }, + "getVotingWeight(address,uint32)": { + "notice": "Calculates the voting weight an address has for a specific Proposal." + }, + "hasVoted(uint32,address)": { + "notice": "Returns whether an address has voted on the specified Proposal." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "meetsQuorum(uint256,uint256,uint256)": { + "notice": "Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes." + }, + "quorumNumerator()": { + "notice": "The numerator to use when calculating quorum (adjustable). " + }, + "quorumVotes(uint32)": { + "notice": "Calculates the total number of votes required for a proposal to meet quorum. " + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "requiredProposerWeight()": { + "notice": "Voting weight required to be able to submit Proposals. " + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateQuorumNumerator(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateRequiredProposerWeight(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8)": { + "notice": "Casts votes for a Proposal, equal to the caller's token delegation." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 801, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "quorumNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "105", + "type": "t_uint256" + }, + { + "astId": 1629, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "governanceToken", + "offset": 0, + "slot": "106", + "type": "t_contract(IVotes)663" + }, + { + "astId": 1632, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 20, + "slot": "106", + "type": "t_uint32" + }, + { + "astId": 1635, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "requiredProposerWeight", + "offset": 0, + "slot": "107", + "type": "t_uint256" + }, + { + "astId": 1641, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "108", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)" + } + ], + "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_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "t_contract(IVotes)663": { + "encoding": "inplace", + "label": "contract IVotes", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC20VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)1626_storage" + }, + "t_struct(ProposalVotes)1626_storage": { + "encoding": "inplace", + "label": "struct LinearERC20VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 1613, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1615, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1617, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 1619, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 1621, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 1625, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_bool)" + } + ], + "numberOfBytes": "160" + }, + "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/optimism/LinearERC721VotingWithHatsProposalCreation.json b/deployments/optimism/LinearERC721VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..4c27863 --- /dev/null +++ b/deployments/optimism/LinearERC721VotingWithHatsProposalCreation.json @@ -0,0 +1,1440 @@ +{ + "address": "0xa66293cB5396d1E2c1DDe4c44b6122079AbAEd02", + "abi": [ + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdAlreadyVoted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdNotOwned", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParams", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotingWeight", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "TokenAlreadySet", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "GovernanceTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "GovernanceTokenRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposerThreshold", + "type": "uint256" + } + ], + "name": "ProposerThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumThreshold", + "type": "uint256" + } + ], + "name": "QuorumThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "tokenAddresses", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_weight", + "type": "uint256" + } + ], + "name": "addGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllTokenAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "getTokenWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint32", + "name": "votingStartBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposerThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "removeGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokenAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenWeights", + "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": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_proposerThreshold", + "type": "uint256" + } + ], + "name": "updateProposerThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumThreshold", + "type": "uint256" + } + ], + "name": "updateQuorumThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "_tokenAddresses", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x373b6bbdc5f6004ebbe0ebc9af76d786f2d761ed31d3c02dba414a37ef755ca5", + "receipt": { + "to": null, + "from": "0xb5Ca125166C1987A35EDD550E16846Fa1e1D9bB3", + "contractAddress": "0xa66293cB5396d1E2c1DDe4c44b6122079AbAEd02", + "transactionIndex": 9, + "gasUsed": "1961378", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400002000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2284fb27d2a7b9fae189d7abc1627850b4e7f68353489898e67f08aaef5b06e5", + "transactionHash": "0x373b6bbdc5f6004ebbe0ebc9af76d786f2d761ed31d3c02dba414a37ef755ca5", + "logs": [ + { + "transactionIndex": 9, + "blockNumber": 127658062, + "transactionHash": "0x373b6bbdc5f6004ebbe0ebc9af76d786f2d761ed31d3c02dba414a37ef755ca5", + "address": "0xa66293cB5396d1E2c1DDe4c44b6122079AbAEd02", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 12, + "blockHash": "0x2284fb27d2a7b9fae189d7abc1627850b4e7f68353489898e67f08aaef5b06e5" + } + ], + "blockNumber": 127658062, + "cumulativeGasUsed": "2684124", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdNotOwned\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoVotingWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"GovernanceTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"GovernanceTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"ProposerThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"QuorumThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokenAddresses\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_weight\",\"type\":\"uint256\"}],\"name\":\"addGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllTokenAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalVotes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"votingStartBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposerThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorumThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"removeGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenWeights\",\"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\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"updateProposerThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"updateQuorumThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"_tokenAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"addGovernanceToken(address,uint256)\":{\"params\":{\"_tokenAddress\":\"the address of the ERC-721 token\",\"_weight\":\"the number of votes each NFT id is worth\"}},\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getTokenWeight(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token address\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address,uint256)\":{\"params\":{\"_proposalId\":\"the id of the Proposal\",\"_tokenAddress\":\"the ERC-721 contract address\",\"_tokenId\":\"the unique id of the NFT\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeGovernanceToken(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token to remove\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateProposerThreshold(uint256)\":{\"params\":{\"_proposerThreshold\":\"required voting weight\"}},\"updateQuorumThreshold(uint256)\":{\"params\":{\"_quorumThreshold\":\"total voting weight required to achieve quorum\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8,address[],uint256[])\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_tokenAddresses\":\"list of ERC-721 addresses that correspond to ids in _tokenIds\",\"_tokenIds\":\"list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"addGovernanceToken(address,uint256)\":{\"notice\":\"Adds a new ERC-721 token as a governance token, along with its associated weight.\"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getAllTokenAddresses()\":{\"notice\":\"Returns whole list of governance tokens addresses\"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getTokenWeight(address)\":{\"notice\":\"Returns the current token weight for the given ERC-721 token address.\"},\"hasVoted(uint32,address,uint256)\":{\"notice\":\"Returns whether an NFT id has already voted.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"proposalVotes(uint256)\":{\"notice\":\"`proposalId` to `ProposalVotes`, the voting state of a Proposal. \"},\"proposerThreshold()\":{\"notice\":\"The minimum number of voting power required to create a new proposal.\"},\"quorumThreshold()\":{\"notice\":\"The total number of votes required to achieve quorum. \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this.\"},\"removeGovernanceToken(address)\":{\"notice\":\"Removes the given ERC-721 token address from the list of governance tokens.\"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"tokenAddresses(uint256)\":{\"notice\":\"The list of ERC-721 tokens that can vote. \"},\"tokenWeights(address)\":{\"notice\":\"ERC-721 address to its voting weight per NFT id. \"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateProposerThreshold(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateQuorumThreshold(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8,address[],uint256[])\":{\"notice\":\"Submits a vote on an existing Proposal.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":\"LinearERC721VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"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/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IERC721VotingStrategy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\n/**\\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\\n * voting strategy.\\n */\\ninterface IERC721VotingStrategy {\\n\\n /**\\n * Returns the current token weight for the given ERC-721 token address.\\n *\\n * @param _tokenAddress the ERC-721 token address\\n */\\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa51db3de9ceb151077007952031ac96263b8138c8ae74758f98a4d5bd71fa86c\",\"license\":\"MIT\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC721VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {IERC721VotingStrategy} from \\\"../interfaces/IERC721VotingStrategy.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\nimport {IAzorius} from \\\"../interfaces/IAzorius.sol\\\";\\nimport {BaseStrategy} from \\\"../BaseStrategy.sol\\\";\\n\\n/**\\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\\n * each with their own voting weight.\\n *\\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\\n *\\n * Also, this uses \\\"quorumThreshold\\\" rather than LinearERC20Voting's quorumPercent, because the\\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\\n * \\\"total signers\\\" required, rather than a percentage of the tokens.\\n *\\n * This contract is an extensible version of LinearERC721Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC721VotingExtensible is\\n BaseStrategy,\\n BaseVotingBasisPercent,\\n IERC721VotingStrategy\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n /**\\n * ERC-721 contract address to individual NFT id to bool\\n * of whether it has voted on this proposal.\\n */\\n mapping(address => mapping(uint256 => bool)) hasVoted;\\n }\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) public proposalVotes;\\n\\n /** The list of ERC-721 tokens that can vote. */\\n address[] public tokenAddresses;\\n\\n /** ERC-721 address to its voting weight per NFT id. */\\n mapping(address => uint256) public tokenWeights;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /**\\n * The total number of votes required to achieve quorum.\\n * \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no\\n * totalSupply function, so the contract cannot determine this.\\n */\\n uint256 public quorumThreshold;\\n\\n /**\\n * The minimum number of voting power required to create a new proposal.\\n */\\n uint256 public proposerThreshold;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event QuorumThresholdUpdated(uint256 quorumThreshold);\\n event ProposerThresholdUpdated(uint256 proposerThreshold);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n address[] tokenAddresses,\\n uint256[] tokenIds\\n );\\n event GovernanceTokenAdded(address token, uint256 weight);\\n event GovernanceTokenRemoved(address token);\\n\\n error InvalidParams();\\n error InvalidProposal();\\n error VotingEnded();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n error NoVotingWeight();\\n error TokenAlreadySet();\\n error TokenNotSet();\\n error IdAlreadyVoted(uint256 tokenId);\\n error IdNotOwned(uint256 tokenId);\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _proposerThreshold,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n uint256\\n )\\n );\\n\\n if (_tokens.length != _weights.length) {\\n revert InvalidParams();\\n }\\n\\n for (uint i = 0; i < _tokens.length; ) {\\n _addGovernanceToken(_tokens[i], _weights[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumThreshold(_quorumThreshold);\\n _updateProposerThreshold(_proposerThreshold);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\\n *\\n * @param _tokenAddress the address of the ERC-721 token\\n * @param _weight the number of votes each NFT id is worth\\n */\\n function addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) external virtual onlyOwner {\\n _addGovernanceToken(_tokenAddress, _weight);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumThreshold total voting weight required to achieve quorum\\n */\\n function updateQuorumThreshold(\\n uint256 _quorumThreshold\\n ) external virtual onlyOwner {\\n _updateQuorumThreshold(_quorumThreshold);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _proposerThreshold required voting weight\\n */\\n function updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) external virtual onlyOwner {\\n _updateProposerThreshold(_proposerThreshold);\\n }\\n\\n /**\\n * Returns whole list of governance tokens addresses\\n */\\n function getAllTokenAddresses()\\n external\\n view\\n virtual\\n returns (address[] memory)\\n {\\n return tokenAddresses;\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /**\\n * Submits a vote on an existing Proposal.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function vote(\\n uint32 _proposalId,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) external virtual {\\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\\n }\\n\\n /** @inheritdoc IERC721VotingStrategy*/\\n function getTokenWeight(\\n address _tokenAddress\\n ) external view virtual override returns (uint256) {\\n return tokenWeights[_tokenAddress];\\n }\\n\\n /**\\n * Returns whether an NFT id has already voted.\\n *\\n * @param _proposalId the id of the Proposal\\n * @param _tokenAddress the ERC-721 contract address\\n * @param _tokenId the unique id of the NFT\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _tokenAddress,\\n uint256 _tokenId\\n ) external view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\\n }\\n\\n /**\\n * Removes the given ERC-721 token address from the list of governance tokens.\\n *\\n * @param _tokenAddress the ERC-721 token to remove\\n */\\n function removeGovernanceToken(\\n address _tokenAddress\\n ) external virtual onlyOwner {\\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\\n\\n tokenWeights[_tokenAddress] = 0;\\n\\n uint256 length = tokenAddresses.length;\\n for (uint256 i = 0; i < length; ) {\\n if (_tokenAddress == tokenAddresses[i]) {\\n uint256 last = length - 1;\\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\\n delete tokenAddresses[last]; // delete the last token\\n break;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit GovernanceTokenRemoved(_tokenAddress);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n quorumThreshold <=\\n proposalVotes[_proposalId].yesVotes +\\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n uint256 totalWeight = 0;\\n for (uint i = 0; i < tokenAddresses.length; ) {\\n address tokenAddress = tokenAddresses[i];\\n totalWeight +=\\n IERC721(tokenAddress).balanceOf(_address) *\\n tokenWeights[tokenAddress];\\n unchecked {\\n ++i;\\n }\\n }\\n return totalWeight >= proposerThreshold;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `addGovernanceToken` */\\n function _addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) internal virtual {\\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\\n revert InvalidTokenAddress();\\n\\n if (_weight == 0) revert NoVotingWeight();\\n\\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\\n\\n tokenAddresses.push(_tokenAddress);\\n tokenWeights[_tokenAddress] = _weight;\\n\\n emit GovernanceTokenAdded(_tokenAddress, _weight);\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateQuorumThreshold`. */\\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\\n quorumThreshold = _quorumThreshold;\\n emit QuorumThresholdUpdated(quorumThreshold);\\n }\\n\\n /** Internal implementation of `updateProposerThreshold`. */\\n function _updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) internal virtual {\\n proposerThreshold = _proposerThreshold;\\n emit ProposerThresholdUpdated(_proposerThreshold);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) internal virtual {\\n uint256 weight;\\n\\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\\n // to vote twice if you get more weight later on\\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\\n address tokenAddress = _tokenAddresses[i];\\n uint256 tokenId = _tokenIds[i];\\n\\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\\n revert IdNotOwned(tokenId);\\n }\\n\\n if (\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\\n true\\n ) {\\n revert IdAlreadyVoted(tokenId);\\n }\\n\\n weight += tokenWeights[tokenAddress];\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (weight == 0) revert NoVotingWeight();\\n\\n ProposalVotes storage proposal = proposalVotes[_proposalId];\\n\\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\\n\\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposal.noVotes += weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposal.yesVotes += weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposal.abstainVotes += weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\\n }\\n}\\n\",\"keccak256\":\"0xd4080f58d0b3abe47b825f0b43fc5061143319a93de5ff8752b6591d3effef75\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {LinearERC721VotingExtensible} from \\\"./LinearERC721VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC721VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC721VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC721VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _tokens,\\n _weights,\\n _azoriusModule,\\n _votingPeriod,\\n _quorumThreshold,\\n 0, // _proposerThreshold is zero because we only care about the hat check\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0x78f0f627fe0f63c7d1ae8ec0333f0e55d801412f34b7597b12e9007a23fcd0d7\",\"license\":\"MIT\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61220680620000ee6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "addGovernanceToken(address,uint256)": { + "params": { + "_tokenAddress": "the address of the ERC-721 token", + "_weight": "the number of votes each NFT id is worth" + } + }, + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getTokenWeight(address)": { + "params": { + "_tokenAddress": "the ERC-721 token address" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address,uint256)": { + "params": { + "_proposalId": "the id of the Proposal", + "_tokenAddress": "the ERC-721 contract address", + "_tokenId": "the unique id of the NFT" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "removeGovernanceToken(address)": { + "params": { + "_tokenAddress": "the ERC-721 token to remove" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateProposerThreshold(uint256)": { + "params": { + "_proposerThreshold": "required voting weight" + } + }, + "updateQuorumThreshold(uint256)": { + "params": { + "_quorumThreshold": "total voting weight required to achieve quorum" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8,address[],uint256[])": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_tokenAddresses": "list of ERC-721 addresses that correspond to ids in _tokenIds", + "_tokenIds": "list of unique token ids that correspond to their ERC-721 address in _tokenAddresses", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "addGovernanceToken(address,uint256)": { + "notice": "Adds a new ERC-721 token as a governance token, along with its associated weight." + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getAllTokenAddresses()": { + "notice": "Returns whole list of governance tokens addresses" + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getTokenWeight(address)": { + "notice": "Returns the current token weight for the given ERC-721 token address." + }, + "hasVoted(uint32,address,uint256)": { + "notice": "Returns whether an NFT id has already voted." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "proposalVotes(uint256)": { + "notice": "`proposalId` to `ProposalVotes`, the voting state of a Proposal. " + }, + "proposerThreshold()": { + "notice": "The minimum number of voting power required to create a new proposal." + }, + "quorumThreshold()": { + "notice": "The total number of votes required to achieve quorum. \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this." + }, + "removeGovernanceToken(address)": { + "notice": "Removes the given ERC-721 token address from the list of governance tokens." + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "tokenAddresses(uint256)": { + "notice": "The list of ERC-721 tokens that can vote. " + }, + "tokenWeights(address)": { + "notice": "ERC-721 address to its voting weight per NFT id. " + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateProposerThreshold(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateQuorumThreshold(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8,address[],uint256[])": { + "notice": "Submits a vote on an existing Proposal." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 2378, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)" + }, + { + "astId": 2382, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenAddresses", + "offset": 0, + "slot": "106", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 2387, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenWeights", + "offset": 0, + "slot": "107", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2390, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 0, + "slot": "108", + "type": "t_uint32" + }, + { + "astId": 2393, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "quorumThreshold", + "offset": 0, + "slot": "109", + "type": "t_uint256" + }, + { + "astId": 2396, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposerThreshold", + "offset": 0, + "slot": "110", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "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_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => 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_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC721VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)2372_storage" + }, + "t_struct(ProposalVotes)2372_storage": { + "encoding": "inplace", + "label": "struct LinearERC721VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 2356, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2358, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2360, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2362, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 2364, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2371, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))" + } + ], + "numberOfBytes": "160" + }, + "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/optimism/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json b/deployments/optimism/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json new file mode 100644 index 0000000..df3a3a7 --- /dev/null +++ b/deployments/optimism/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json @@ -0,0 +1,107 @@ +{ + "language": "Solidity", + "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" + }, + "@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/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" + }, + "@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/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/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\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/azorius/BaseQuorumPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based quorums.\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\n */\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating quorum (adjustable). */\n uint256 public quorumNumerator;\n\n /** The denominator to use when calculating quorum (1,000,000). */\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\n\n /** Ensures the numerator cannot be larger than the denominator. */\n error InvalidQuorumNumerator();\n\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\n\n /** \n * Updates the quorum required for future Proposals.\n *\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\n */\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\n _updateQuorumNumerator(_quorumNumerator);\n }\n\n /** Internal implementation of `updateQuorumNumerator`. */\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\n if (_quorumNumerator > QUORUM_DENOMINATOR)\n revert InvalidQuorumNumerator();\n\n quorumNumerator = _quorumNumerator;\n\n emit QuorumNumeratorUpdated(_quorumNumerator);\n }\n\n /**\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\n * votes.\n *\n * @param _totalSupply the total supply of tokens\n * @param _yesVotes number of votes in favor\n * @param _abstainVotes number of votes abstaining\n * @return bool whether the total number of yes votes + abstain meets the quorum\n */\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\n }\n\n /**\n * Calculates the total number of votes required for a proposal to meet quorum.\n * \n * @param _proposalId The ID of the proposal to get quorum votes for\n * @return uint256 The quantity of votes required to meet quorum\n */\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\n}\n" + }, + "contracts/azorius/BaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { IAzorius } from \"./interfaces/IAzorius.sol\";\nimport { IBaseStrategy } from \"./interfaces/IBaseStrategy.sol\";\nimport { FactoryFriendly } from \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * The base abstract contract for all voting strategies in Azorius.\n */\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\n\n event AzoriusSet(address indexed azoriusModule);\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\n\n error OnlyAzorius();\n\n IAzorius public azoriusModule;\n\n /**\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\n */\n modifier onlyAzorius() {\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\n _;\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /** @inheritdoc IBaseStrategy*/\n function setAzorius(address _azoriusModule) external onlyOwner {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n\n /** @inheritdoc IBaseStrategy*/\n function initializeProposal(bytes memory _data) external virtual;\n\n /** @inheritdoc IBaseStrategy*/\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function isProposer(address _address) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\n\n /**\n * Sets the address of the [Azorius](Azorius.md) module contract.\n *\n * @param _azoriusModule address of the Azorius module\n */\n function _setAzorius(address _azoriusModule) internal {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n}\n" + }, + "contracts/azorius/BaseVotingBasisPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based voting basis calculations.\n *\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\n *\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\n * See https://en.wikipedia.org/wiki/Supermajority.\n */\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating basis (adjustable). */\n uint256 public basisNumerator;\n\n /** The denominator to use when calculating basis (1,000,000). */\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\n\n error InvalidBasisNumerator();\n\n event BasisNumeratorUpdated(uint256 basisNumerator);\n\n /**\n * Updates the `basisNumerator` for future Proposals.\n *\n * @param _basisNumerator numerator to use\n */\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\n _updateBasisNumerator(_basisNumerator);\n }\n\n /** Internal implementation of `updateBasisNumerator`. */\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\n revert InvalidBasisNumerator();\n\n basisNumerator = _basisNumerator;\n\n emit BasisNumeratorUpdated(_basisNumerator);\n }\n\n /**\n * Calculates whether a vote meets its basis.\n *\n * @param _yesVotes number of votes in favor\n * @param _noVotes number of votes against\n * @return bool whether the yes votes meets the set basis\n */\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/interfaces/IAzorius.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport { Enum } from \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\n/**\n * The base interface for the Azorius governance Safe module.\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\n *\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\n *\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\n * as customizable as possible.\n *\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\n *\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\n * for the duration of its voting period.\n *\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\n * it cannot yet be executed. This is to allow time for token holders\n * to potentially exit their position, as well as parent DAOs time to\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\n * for the duration of its `timelockPeriod`.\n *\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\n * and can then finally be executed on chain by anyone.\n *\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\n * on the blockchain.\n *\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\n * elapsed will be `EXPIRED`, and can no longer be executed.\n *\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \n * `isPassed` function). For a basic strategy, this would mean it received more \n * NO votes than YES or did not achieve quorum. \n */\ninterface IAzorius {\n\n /** Represents a transaction to perform on the blockchain. */\n struct Transaction {\n address to; // destination address of the transaction\n uint256 value; // amount of ETH to transfer with the transaction\n bytes data; // encoded function call data of the transaction\n Enum.Operation operation; // Operation type, Call or DelegateCall\n }\n\n /** Holds details pertaining to a single proposal. */\n struct Proposal {\n uint32 executionCounter; // count of transactions that have been executed within the proposal\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\n address strategy; // BaseStrategy contract this proposal was created on\n bytes32[] txHashes; // hashes of the transactions that are being proposed\n }\n\n /** The list of states in which a Proposal can be in at any given time. */\n enum ProposalState {\n ACTIVE,\n TIMELOCKED,\n EXECUTABLE,\n EXECUTED,\n EXPIRED,\n FAILED\n }\n\n /**\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\n *\n * Multiple strategies can be enabled, and new Proposals will be able to be\n * created using any of the currently enabled strategies.\n *\n * @param _strategy contract address of the BaseStrategy to be enabled\n */\n function enableStrategy(address _strategy) external;\n\n /**\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\n * @param _strategy address of the BaseStrategy to be removed\n */\n function disableStrategy(address _prevStrategy, address _strategy) external;\n\n /**\n * Updates the `timelockPeriod` for newly created Proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\n */\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\n\n /**\n * Updates the execution period for future Proposals.\n *\n * @param _executionPeriod new execution period (in blocks)\n */\n function updateExecutionPeriod(uint32 _executionPeriod) external;\n\n /**\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\n * New Proposals begin immediately in the `ACTIVE` state.\n *\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \n * but is included in case future strategy contracts have a need for it\n * @param _transactions array of transactions to propose\n * @param _metadata additional data such as a title/description to submit with the proposal\n */\n function submitProposal(\n address _strategy,\n bytes memory _data,\n Transaction[] calldata _transactions,\n string calldata _metadata\n ) external;\n\n /**\n * Executes all transactions within a Proposal.\n * This will only be able to be called if the Proposal passed.\n *\n * @param _proposalId identifier of the Proposal\n * @param _targets target contracts for each transaction\n * @param _values ETH values to be sent with each transaction\n * @param _data transaction data to be executed\n * @param _operations Calls or Delegatecalls\n */\n function executeProposal(\n uint32 _proposalId,\n address[] memory _targets,\n uint256[] memory _values,\n bytes[] memory _data,\n Enum.Operation[] memory _operations\n ) external;\n\n /**\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\n *\n * @param _strategy contract address of the BaseStrategy to check\n * @return bool True if the strategy is enabled, otherwise False\n */\n function isStrategyEnabled(address _strategy) external view returns (bool);\n\n /**\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\n * Because the list of BaseStrategies is technically unbounded, this\n * requires the address of the first strategy you would like, along\n * with the total count of strategies to return, rather than\n * returning the whole list at once.\n *\n * @param _startAddress contract address of the BaseStrategy to start with\n * @param _count maximum number of BaseStrategies that should be returned\n * @return _strategies array of BaseStrategies\n * @return _next next BaseStrategy contract address in the linked list\n */\n function getStrategies(\n address _startAddress,\n uint256 _count\n ) external view returns (address[] memory _strategies, address _next);\n\n /**\n * Gets the state of a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return ProposalState uint256 ProposalState enum value representing the\n * current state of the proposal\n */\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\n\n /**\n * Generates the data for the module transaction hash (required for signing).\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @param _nonce Safe nonce of the transaction\n * @return bytes hashed transaction data\n */\n function generateTxHashData(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation,\n uint256 _nonce\n ) external view returns (bytes memory);\n\n /**\n * Returns the `keccak256` hash of the specified transaction.\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @return bytes32 transaction hash\n */\n function getTxHash(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation\n ) external view returns (bytes32);\n\n /**\n * Returns the hash of a transaction in a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @param _txIndex index of the transaction within the Proposal\n * @return bytes32 hash of the specified transaction\n */\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\n\n /**\n * Returns the transaction hashes associated with a given `proposalId`.\n *\n * @param _proposalId identifier of the Proposal to get transaction hashes for\n * @return bytes32[] array of transaction hashes\n */\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\n\n /**\n * Returns details about the specified Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return _strategy address of the BaseStrategy contract the Proposal is on\n * @return _txHashes hashes of the transactions the Proposal contains\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\n */\n function getProposal(uint32 _proposalId) external view\n returns (\n address _strategy,\n bytes32[] memory _txHashes,\n uint32 _timelockPeriod,\n uint32 _executionPeriod,\n uint32 _executionCounter\n );\n}\n" + }, + "contracts/azorius/interfaces/IBaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\n/**\n * The specification for a voting strategy in Azorius.\n *\n * Each IBaseStrategy implementation need only implement the given functions here,\n * which allows for highly composable but simple or complex voting strategies.\n *\n * It should be noted that while many voting strategies make use of parameters such as\n * voting period or quorum, that is a detail of the individual strategy itself, and not\n * a requirement for the Azorius protocol.\n */\ninterface IBaseStrategy {\n\n /**\n * Sets the address of the [Azorius](../Azorius.md) contract this \n * [BaseStrategy](../BaseStrategy.md) is being used on.\n *\n * @param _azoriusModule address of the Azorius Safe module\n */\n function setAzorius(address _azoriusModule) external;\n\n /**\n * Called by the [Azorius](../Azorius.md) module. This notifies this \n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\n *\n * @param _data arbitrary data to pass to this BaseStrategy\n */\n function initializeProposal(bytes memory _data) external;\n\n /**\n * Returns whether a Proposal has been passed.\n *\n * @param _proposalId proposalId to check\n * @return bool true if the proposal has passed, otherwise false\n */\n function isPassed(uint32 _proposalId) external view returns (bool);\n\n /**\n * Returns whether the specified address can submit a Proposal with\n * this [BaseStrategy](../BaseStrategy.md).\n *\n * This allows a BaseStrategy to place any limits it would like on\n * who can create new Proposals, such as requiring a minimum token\n * delegation.\n *\n * @param _address address to check\n * @return bool true if the address can submit a Proposal, otherwise false\n */\n function isProposer(address _address) external view returns (bool);\n\n /**\n * Returns the block number voting ends on a given Proposal.\n *\n * @param _proposalId proposalId to check\n * @return uint32 block number when voting ends on the Proposal\n */\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\n}\n" + }, + "contracts/azorius/interfaces/IERC721VotingStrategy.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\n/**\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\n * voting strategy.\n */\ninterface IERC721VotingStrategy {\n\n /**\n * Returns the current token weight for the given ERC-721 token address.\n *\n * @param _tokenAddress the ERC-721 token address\n */\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\n}\n" + }, + "contracts/azorius/strategies/HatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\n event HatWhitelisted(uint256 hatId);\n event HatRemovedFromWhitelist(uint256 hatId);\n\n IHats public hatsContract;\n\n /** Array to store whitelisted Hat IDs. */\n uint256[] private whitelistedHatIds;\n\n error InvalidHatsContract();\n error NoHatsWhitelisted();\n error HatAlreadyWhitelisted();\n error HatNotWhitelisted();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters:\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(bytes memory initializeParams) public virtual {\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\n .decode(initializeParams, (address, uint256[]));\n\n if (_hatsContract == address(0)) revert InvalidHatsContract();\n hatsContract = IHats(_hatsContract);\n\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\n _whitelistHat(_initialWhitelistedHats[i]);\n }\n }\n\n /**\n * Adds a Hat to the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to whitelist\n */\n function whitelistHat(uint256 _hatId) external onlyOwner {\n _whitelistHat(_hatId);\n }\n\n /**\n * Internal function to add a Hat to the whitelist.\n * @param _hatId The ID of the Hat to whitelist\n */\n function _whitelistHat(uint256 _hatId) internal {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\n }\n whitelistedHatIds.push(_hatId);\n emit HatWhitelisted(_hatId);\n }\n\n /**\n * Removes a Hat from the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to remove from the whitelist\n */\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\n bool found = false;\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) {\n whitelistedHatIds[i] = whitelistedHatIds[\n whitelistedHatIds.length - 1\n ];\n whitelistedHatIds.pop();\n found = true;\n break;\n }\n }\n if (!found) revert HatNotWhitelisted();\n\n emit HatRemovedFromWhitelist(_hatId);\n }\n\n /**\n * @dev Checks if an address is authorized to create proposals.\n * @param _address The address to check for proposal creation authorization.\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\n * @notice This function overrides the isProposer function from the parent contract.\n * It iterates through all whitelisted Hat IDs and checks if the given address\n * is wearing any of them using the Hats Protocol.\n */\n function isProposer(address _address) public view virtual returns (bool) {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @dev Returns the IDs of all whitelisted Hats.\n * @return uint256[] memory An array of whitelisted Hat IDs.\n */\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\n return whitelistedHatIds;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IVotes} from \"@openzeppelin/contracts/governance/utils/IVotes.sol\";\nimport {BaseStrategy, IBaseStrategy} from \"../BaseStrategy.sol\";\nimport {BaseQuorumPercent} from \"../BaseQuorumPercent.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\n *\n * This contract is an extensible version of LinearERC20Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC20VotingExtensible is\n BaseStrategy,\n BaseQuorumPercent,\n BaseVotingBasisPercent\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\n }\n\n IVotes public governanceToken;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /** Voting weight required to be able to submit Proposals. */\n uint256 public requiredProposerWeight;\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) internal proposalVotes;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n uint256 weight\n );\n\n error InvalidProposal();\n error VotingEnded();\n error AlreadyVoted();\n error InvalidVote();\n error InvalidTokenAddress();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n IVotes _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _requiredProposerWeight,\n uint256 _quorumNumerator,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (address, IVotes, address, uint32, uint256, uint256, uint256)\n );\n if (address(_governanceToken) == address(0))\n revert InvalidTokenAddress();\n\n governanceToken = _governanceToken;\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumNumerator(_quorumNumerator);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n _updateRequiredProposerWeight(_requiredProposerWeight);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _requiredProposerWeight required token voting weight\n */\n function updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) external virtual onlyOwner {\n _updateRequiredProposerWeight(_requiredProposerWeight);\n }\n\n /**\n * Casts votes for a Proposal, equal to the caller's token delegation.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n */\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\n _vote(\n _proposalId,\n msg.sender,\n _voteType,\n getVotingWeight(msg.sender, _proposalId)\n );\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock,\n uint256 votingSupply\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n votingSupply = getProposalVotingSupply(_proposalId);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /**\n * Returns whether an address has voted on the specified Proposal.\n *\n * @param _proposalId id of the Proposal to check\n * @param _address address to check\n * @return bool true if the address has voted on the Proposal, otherwise false\n */\n function hasVoted(\n uint32 _proposalId,\n address _address\n ) public view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_address];\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n meetsQuorum(\n getProposalVotingSupply(_proposalId),\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].abstainVotes\n ) && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /**\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\n * not when it is being voted on passes / fails.\n *\n * @param _proposalId id of the Proposal\n * @return uint256 voting supply snapshot for the given _proposalId\n */\n function getProposalVotingSupply(\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastTotalSupply(\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /**\n * Calculates the voting weight an address has for a specific Proposal.\n *\n * @param _voter address of the voter\n * @param _proposalId id of the Proposal\n * @return uint256 the address' voting weight\n */\n function getVotingWeight(\n address _voter,\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastVotes(\n _voter,\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n return\n governanceToken.getPastVotes(_address, block.number - 1) >=\n requiredProposerWeight;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateRequiredProposerWeight`. */\n function _updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) internal virtual {\n requiredProposerWeight = _requiredProposerWeight;\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _weight amount of voting weight cast, typically the\n * total number of tokens delegated\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n uint256 _weight\n ) internal virtual {\n if (proposalVotes[_proposalId].votingEndBlock == 0)\n revert InvalidProposal();\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\n revert VotingEnded();\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\n\n proposalVotes[_proposalId].hasVoted[_voter] = true;\n\n if (_voteType == uint8(VoteType.NO)) {\n proposalVotes[_proposalId].noVotes += _weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposalVotes[_proposalId].yesVotes += _weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposalVotes[_proposalId].abstainVotes += _weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _weight);\n }\n\n /** @inheritdoc BaseQuorumPercent*/\n function quorumVotes(\n uint32 _proposalId\n ) public view virtual override returns (uint256) {\n return\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\n QUORUM_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {LinearERC20VotingExtensible} from \"./LinearERC20VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC20VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC20VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\n * `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n {\n (\n address _owner,\n address _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumNumerator,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address,\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC20VotingExtensible.setUp(\n abi.encode(\n _owner,\n _governanceToken,\n _azoriusModule,\n _votingPeriod,\n 0, // requiredProposerWeight is zero because we only care about the hat check\n _quorumNumerator,\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {IERC721VotingStrategy} from \"../interfaces/IERC721VotingStrategy.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\nimport {IAzorius} from \"../interfaces/IAzorius.sol\";\nimport {BaseStrategy} from \"../BaseStrategy.sol\";\n\n/**\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\n * each with their own voting weight.\n *\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\n *\n * Also, this uses \"quorumThreshold\" rather than LinearERC20Voting's quorumPercent, because the\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\n * \"total signers\" required, rather than a percentage of the tokens.\n *\n * This contract is an extensible version of LinearERC721Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC721VotingExtensible is\n BaseStrategy,\n BaseVotingBasisPercent,\n IERC721VotingStrategy\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n /**\n * ERC-721 contract address to individual NFT id to bool\n * of whether it has voted on this proposal.\n */\n mapping(address => mapping(uint256 => bool)) hasVoted;\n }\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) public proposalVotes;\n\n /** The list of ERC-721 tokens that can vote. */\n address[] public tokenAddresses;\n\n /** ERC-721 address to its voting weight per NFT id. */\n mapping(address => uint256) public tokenWeights;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /**\n * The total number of votes required to achieve quorum.\n * \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no\n * totalSupply function, so the contract cannot determine this.\n */\n uint256 public quorumThreshold;\n\n /**\n * The minimum number of voting power required to create a new proposal.\n */\n uint256 public proposerThreshold;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event QuorumThresholdUpdated(uint256 quorumThreshold);\n event ProposerThresholdUpdated(uint256 proposerThreshold);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n address[] tokenAddresses,\n uint256[] tokenIds\n );\n event GovernanceTokenAdded(address token, uint256 weight);\n event GovernanceTokenRemoved(address token);\n\n error InvalidParams();\n error InvalidProposal();\n error VotingEnded();\n error InvalidVote();\n error InvalidTokenAddress();\n error NoVotingWeight();\n error TokenAlreadySet();\n error TokenNotSet();\n error IdAlreadyVoted(uint256 tokenId);\n error IdNotOwned(uint256 tokenId);\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _proposerThreshold,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n uint256\n )\n );\n\n if (_tokens.length != _weights.length) {\n revert InvalidParams();\n }\n\n for (uint i = 0; i < _tokens.length; ) {\n _addGovernanceToken(_tokens[i], _weights[i]);\n unchecked {\n ++i;\n }\n }\n\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumThreshold(_quorumThreshold);\n _updateProposerThreshold(_proposerThreshold);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\n *\n * @param _tokenAddress the address of the ERC-721 token\n * @param _weight the number of votes each NFT id is worth\n */\n function addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) external virtual onlyOwner {\n _addGovernanceToken(_tokenAddress, _weight);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the quorum required for future Proposals.\n *\n * @param _quorumThreshold total voting weight required to achieve quorum\n */\n function updateQuorumThreshold(\n uint256 _quorumThreshold\n ) external virtual onlyOwner {\n _updateQuorumThreshold(_quorumThreshold);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _proposerThreshold required voting weight\n */\n function updateProposerThreshold(\n uint256 _proposerThreshold\n ) external virtual onlyOwner {\n _updateProposerThreshold(_proposerThreshold);\n }\n\n /**\n * Returns whole list of governance tokens addresses\n */\n function getAllTokenAddresses()\n external\n view\n virtual\n returns (address[] memory)\n {\n return tokenAddresses;\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n }\n\n /**\n * Submits a vote on an existing Proposal.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function vote(\n uint32 _proposalId,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) external virtual {\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\n }\n\n /** @inheritdoc IERC721VotingStrategy*/\n function getTokenWeight(\n address _tokenAddress\n ) external view virtual override returns (uint256) {\n return tokenWeights[_tokenAddress];\n }\n\n /**\n * Returns whether an NFT id has already voted.\n *\n * @param _proposalId the id of the Proposal\n * @param _tokenAddress the ERC-721 contract address\n * @param _tokenId the unique id of the NFT\n */\n function hasVoted(\n uint32 _proposalId,\n address _tokenAddress,\n uint256 _tokenId\n ) external view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\n }\n\n /**\n * Removes the given ERC-721 token address from the list of governance tokens.\n *\n * @param _tokenAddress the ERC-721 token to remove\n */\n function removeGovernanceToken(\n address _tokenAddress\n ) external virtual onlyOwner {\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\n\n tokenWeights[_tokenAddress] = 0;\n\n uint256 length = tokenAddresses.length;\n for (uint256 i = 0; i < length; ) {\n if (_tokenAddress == tokenAddresses[i]) {\n uint256 last = length - 1;\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\n delete tokenAddresses[last]; // delete the last token\n break;\n }\n unchecked {\n ++i;\n }\n }\n\n emit GovernanceTokenRemoved(_tokenAddress);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n quorumThreshold <=\n proposalVotes[_proposalId].yesVotes +\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n uint256 totalWeight = 0;\n for (uint i = 0; i < tokenAddresses.length; ) {\n address tokenAddress = tokenAddresses[i];\n totalWeight +=\n IERC721(tokenAddress).balanceOf(_address) *\n tokenWeights[tokenAddress];\n unchecked {\n ++i;\n }\n }\n return totalWeight >= proposerThreshold;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `addGovernanceToken` */\n function _addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) internal virtual {\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\n revert InvalidTokenAddress();\n\n if (_weight == 0) revert NoVotingWeight();\n\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\n\n tokenAddresses.push(_tokenAddress);\n tokenWeights[_tokenAddress] = _weight;\n\n emit GovernanceTokenAdded(_tokenAddress, _weight);\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateQuorumThreshold`. */\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\n quorumThreshold = _quorumThreshold;\n emit QuorumThresholdUpdated(quorumThreshold);\n }\n\n /** Internal implementation of `updateProposerThreshold`. */\n function _updateProposerThreshold(\n uint256 _proposerThreshold\n ) internal virtual {\n proposerThreshold = _proposerThreshold;\n emit ProposerThresholdUpdated(_proposerThreshold);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) internal virtual {\n uint256 weight;\n\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\n // to vote twice if you get more weight later on\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\n address tokenAddress = _tokenAddresses[i];\n uint256 tokenId = _tokenIds[i];\n\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\n revert IdNotOwned(tokenId);\n }\n\n if (\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\n true\n ) {\n revert IdAlreadyVoted(tokenId);\n }\n\n weight += tokenWeights[tokenAddress];\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\n unchecked {\n ++i;\n }\n }\n\n if (weight == 0) revert NoVotingWeight();\n\n ProposalVotes storage proposal = proposalVotes[_proposalId];\n\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\n\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\n\n if (_voteType == uint8(VoteType.NO)) {\n proposal.noVotes += weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposal.yesVotes += weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposal.abstainVotes += weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {LinearERC721VotingExtensible} from \"./LinearERC721VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC721VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC721VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC721VotingExtensible.setUp(\n abi.encode(\n _owner,\n _tokens,\n _weights,\n _azoriusModule,\n _votingPeriod,\n _quorumThreshold,\n 0, // _proposerThreshold is zero because we only care about the hat check\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/interfaces/hats/HatsErrors.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsErrors {\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\n error NotAdmin(address user, uint256 hatId);\n\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\n error NotHatWearer();\n\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\n error NotAdminOrWearer();\n\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\n error AllHatsWorn(uint256 hatId);\n\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\n error MaxLevelsReached();\n\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\n error InvalidHatId();\n\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\n error AlreadyWearingHat(address wearer, uint256 hatId);\n\n /// @notice Emitted when attempting to mint a non-existant hat\n error HatDoesNotExist(uint256 hatId);\n\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\n error HatNotActive();\n\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\n error NotEligible();\n\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\n error NotHatsToggle();\n\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\n error NotHatsEligibility();\n\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\n error BatchArrayLengthMismatch();\n\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\n error Immutable();\n\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\n error NewMaxSupplyTooLow();\n\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\n error CircularLinkage();\n\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\n error CrossTreeLinkage();\n\n /// @notice Emitted when attempting to link a tophat without a request\n error LinkageNotRequested();\n\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\n /// @dev This ensures that unlinking never results in a bricked tophat\n error InvalidUnlink();\n\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\n error ZeroAddress();\n\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\n error StringTooLong();\n}\n" + }, + "contracts/interfaces/hats/HatsEvents.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsEvents {\n /// @notice Emitted when a new hat is created\n /// @param id The id for the new hat\n /// @param details A description of the Hat\n /// @param maxSupply The total instances of the Hat that can be worn at once\n /// @param eligibility The address that can report on the Hat wearer's status\n /// @param toggle The address that can deactivate the Hat\n /// @param mutable_ Whether the hat's properties are changeable after creation\n /// @param imageURI The image uri for this hat and the fallback for its\n event HatCreated(\n uint256 id,\n string details,\n uint32 maxSupply,\n address eligibility,\n address toggle,\n bool mutable_,\n string imageURI\n );\n\n /// @notice Emitted when a hat wearer's standing is updated\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\n /// @param hatId The id of the wearer's hat\n /// @param wearer The wearer's address\n /// @param wearerStanding Whether the wearer is in good standing for the hat\n event WearerStandingChanged(\n uint256 hatId,\n address wearer,\n bool wearerStanding\n );\n\n /// @notice Emitted when a hat's status is updated\n /// @param hatId The id of the hat\n /// @param newStatus Whether the hat is active\n event HatStatusChanged(uint256 hatId, bool newStatus);\n\n /// @notice Emitted when a hat's details are updated\n /// @param hatId The id of the hat\n /// @param newDetails The updated details\n event HatDetailsChanged(uint256 hatId, string newDetails);\n\n /// @notice Emitted when a hat's eligibility module is updated\n /// @param hatId The id of the hat\n /// @param newEligibility The updated eligibiliy module\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\n\n /// @notice Emitted when a hat's toggle module is updated\n /// @param hatId The id of the hat\n /// @param newToggle The updated toggle module\n event HatToggleChanged(uint256 hatId, address newToggle);\n\n /// @notice Emitted when a hat's mutability is updated\n /// @param hatId The id of the hat\n event HatMutabilityChanged(uint256 hatId);\n\n /// @notice Emitted when a hat's maximum supply is updated\n /// @param hatId The id of the hat\n /// @param newMaxSupply The updated max supply\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\n\n /// @notice Emitted when a hat's image URI is updated\n /// @param hatId The id of the hat\n /// @param newImageURI The updated image URI\n event HatImageURIChanged(uint256 hatId, string newImageURI);\n\n /// @notice Emitted when a tophat linkage is requested by its admin\n /// @param domain The domain of the tree tophat to link\n /// @param newAdmin The tophat's would-be admin in the parent tree\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\n\n /// @notice Emitted when a tophat is linked to a another tree\n /// @param domain The domain of the newly-linked tophat\n /// @param newAdmin The tophat's new admin in the parent tree\n event TopHatLinked(uint32 domain, uint256 newAdmin);\n}\n" + }, + "contracts/interfaces/hats/IHats.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\nimport \"./IHatsIdUtilities.sol\";\nimport \"./HatsErrors.sol\";\nimport \"./HatsEvents.sol\";\n\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\n function mintTopHat(\n address _target,\n string memory _details,\n string memory _imageURI\n ) external returns (uint256 topHatId);\n\n function createHat(\n uint256 _admin,\n string calldata _details,\n uint32 _maxSupply,\n address _eligibility,\n address _toggle,\n bool _mutable,\n string calldata _imageURI\n ) external returns (uint256 newHatId);\n\n function batchCreateHats(\n uint256[] calldata _admins,\n string[] calldata _details,\n uint32[] calldata _maxSupplies,\n address[] memory _eligibilityModules,\n address[] memory _toggleModules,\n bool[] calldata _mutables,\n string[] calldata _imageURIs\n ) external returns (bool success);\n\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\n\n function mintHat(\n uint256 _hatId,\n address _wearer\n ) external returns (bool success);\n\n function batchMintHats(\n uint256[] calldata _hatIds,\n address[] calldata _wearers\n ) external returns (bool success);\n\n function setHatStatus(\n uint256 _hatId,\n bool _newStatus\n ) external returns (bool toggled);\n\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\n\n function setHatWearerStatus(\n uint256 _hatId,\n address _wearer,\n bool _eligible,\n bool _standing\n ) external returns (bool updated);\n\n function checkHatWearerStatus(\n uint256 _hatId,\n address _wearer\n ) external returns (bool updated);\n\n function renounceHat(uint256 _hatId) external;\n\n function transferHat(uint256 _hatId, address _from, address _to) external;\n\n /*//////////////////////////////////////////////////////////////\n HATS ADMIN FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function makeHatImmutable(uint256 _hatId) external;\n\n function changeHatDetails(\n uint256 _hatId,\n string memory _newDetails\n ) external;\n\n function changeHatEligibility(\n uint256 _hatId,\n address _newEligibility\n ) external;\n\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\n\n function changeHatImageURI(\n uint256 _hatId,\n string memory _newImageURI\n ) external;\n\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\n\n function requestLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat\n ) external;\n\n function approveLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\n\n function relinkTopHatWithinTree(\n uint32 _topHatDomain,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n /*//////////////////////////////////////////////////////////////\n VIEW FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function viewHat(\n uint256 _hatId\n )\n external\n view\n returns (\n string memory details,\n uint32 maxSupply,\n uint32 supply,\n address eligibility,\n address toggle,\n string memory imageURI,\n uint16 lastHatId,\n bool mutable_,\n bool active\n );\n\n function isWearerOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isWearer);\n\n function isAdminOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isAdmin);\n\n function isInGoodStanding(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool standing);\n\n function isEligible(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool eligible);\n\n function getHatEligibilityModule(\n uint256 _hatId\n ) external view returns (address eligibility);\n\n function getHatToggleModule(\n uint256 _hatId\n ) external view returns (address toggle);\n\n function getHatMaxSupply(\n uint256 _hatId\n ) external view returns (uint32 maxSupply);\n\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\n\n function getImageURIForHat(\n uint256 _hatId\n ) external view returns (string memory _uri);\n\n function balanceOf(\n address wearer,\n uint256 hatId\n ) external view returns (uint256 balance);\n\n function balanceOfBatch(\n address[] calldata _wearers,\n uint256[] calldata _hatIds\n ) external view returns (uint256[] memory);\n\n function uri(uint256 id) external view returns (string memory _uri);\n}\n" + }, + "contracts/interfaces/hats/IHatsIdUtilities.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface IHatsIdUtilities {\n function buildHatId(\n uint256 _admin,\n uint16 _newHat\n ) external pure returns (uint256 id);\n\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\n\n function getLocalHatLevel(\n uint256 _hatId\n ) external pure returns (uint32 level);\n\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\n\n function isLocalTopHat(\n uint256 _hatId\n ) external pure returns (bool _localTopHat);\n\n function isValidHatId(\n uint256 _hatId\n ) external view returns (bool validHatId);\n\n function getAdminAtLevel(\n uint256 _hatId,\n uint32 _level\n ) external view returns (uint256 admin);\n\n function getAdminAtLocalLevel(\n uint256 _hatId,\n uint32 _level\n ) external pure returns (uint256 admin);\n\n function getTopHatDomain(\n uint256 _hatId\n ) external view returns (uint32 domain);\n\n function getTippyTopHatDomain(\n uint32 _topHatDomain\n ) external view returns (uint32 domain);\n\n function noCircularLinkage(\n uint32 _topHatDomain,\n uint256 _linkedAdmin\n ) external view returns (bool notCircular);\n\n function sameTippyTopHatDomain(\n uint32 _topHatDomain,\n uint256 _newAdminHat\n ) external view returns (bool sameDomain);\n}\n" + }, + "contracts/mocks/MockHatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport \"../azorius/strategies/HatsProposalCreationWhitelist.sol\";\n\ncontract MockHatsProposalCreationWhitelist is HatsProposalCreationWhitelist {\n function setUp(bytes memory initializeParams) public override initializer {\n __Ownable_init();\n super.setUp(initializeParams);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/polygon/LinearERC20VotingWithHatsProposalCreation.json b/deployments/polygon/LinearERC20VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..71caae4 --- /dev/null +++ b/deployments/polygon/LinearERC20VotingWithHatsProposalCreation.json @@ -0,0 +1,1349 @@ +{ + "address": "0x2b67F79f927Be670d44D56338A914BB6d17548C7", + "abi": [ + { + "inputs": [], + "name": "AlreadyVoted", + "type": "error" + }, + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidQuorumNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "requiredProposerWeight", + "type": "uint256" + } + ], + "name": "RequiredProposerWeightUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QUORUM_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votingSupply", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_voter", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getVotingWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governanceToken", + "outputs": [ + { + "internalType": "contract IVotes", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_abstainVotes", + "type": "uint256" + } + ], + "name": "meetsQuorum", + "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": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredProposerWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requiredProposerWeight", + "type": "uint256" + } + ], + "name": "updateRequiredProposerWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xba319415d35ba68af9c1f3f2b52cdc9958601eed51991b36c342e4a418f5988c", + "receipt": { + "to": null, + "from": "0xb5Ca125166C1987A35EDD550E16846Fa1e1D9bB3", + "contractAddress": "0x2b67F79f927Be670d44D56338A914BB6d17548C7", + "transactionIndex": 19, + "gasUsed": "1593488", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000008000000000000000002000000000000000000000000000000000000000800000000000000000000100020000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000080000000000000000000200000000000000000000000000600000000000000000000100000000000004000000000000000000001000000040002000000000000000000100004000000000000000000200000000000000000000000000000000000000000000020100000", + "blockHash": "0xe59c7830b30bf461e5c6f5082760a3ff32f9db87b6c5ed5b62d1e24fd0bed92b", + "transactionHash": "0xba319415d35ba68af9c1f3f2b52cdc9958601eed51991b36c342e4a418f5988c", + "logs": [ + { + "transactionIndex": 19, + "blockNumber": 63963525, + "transactionHash": "0xba319415d35ba68af9c1f3f2b52cdc9958601eed51991b36c342e4a418f5988c", + "address": "0x2b67F79f927Be670d44D56338A914BB6d17548C7", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 138, + "blockHash": "0xe59c7830b30bf461e5c6f5082760a3ff32f9db87b6c5ed5b62d1e24fd0bed92b" + }, + { + "transactionIndex": 19, + "blockNumber": 63963525, + "transactionHash": "0xba319415d35ba68af9c1f3f2b52cdc9958601eed51991b36c342e4a418f5988c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000b5ca125166c1987a35edd550e16846fa1e1d9bb3", + "0x000000000000000000000000794e44d1334a56fea7f4df12633b88820d0c5888" + ], + "data": "0x000000000000000000000000000000000000000000000000011b0f71d5b140000000000000000000000000000000000000000000000000002f5c752350c223a90000000000000000000000000000000000000000000004ada6655793ff1825990000000000000000000000000000000000000000000000002e4165b17b10e3a90000000000000000000000000000000000000000000004ada7806705d4c96599", + "logIndex": 139, + "blockHash": "0xe59c7830b30bf461e5c6f5082760a3ff32f9db87b6c5ed5b62d1e24fd0bed92b" + } + ], + "blockNumber": 63963525, + "cumulativeGasUsed": "5638321", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyVoted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidQuorumNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"QuorumNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"RequiredProposerWeightUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"QUORUM_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votingSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getVotingWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceToken\",\"outputs\":[{\"internalType\":\"contract IVotes\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_abstainVotes\",\"type\":\"uint256\"}],\"name\":\"meetsQuorum\",\"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\":\"quorumNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"quorumVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredProposerWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"updateQuorumNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"updateRequiredProposerWeight\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getProposalVotingSupply(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"_0\":\"uint256 voting supply snapshot for the given _proposalId\"}},\"getVotingWeight(address,uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\",\"_voter\":\"address of the voter\"},\"returns\":{\"_0\":\"uint256 the address' voting weight\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address)\":{\"params\":{\"_address\":\"address to check\",\"_proposalId\":\"id of the Proposal to check\"},\"returns\":{\"_0\":\"bool true if the address has voted on the Proposal, otherwise false\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"meetsQuorum(uint256,uint256,uint256)\":{\"params\":{\"_abstainVotes\":\"number of votes abstaining\",\"_totalSupply\":\"the total supply of tokens\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the total number of yes votes + abstain meets the quorum\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"quorumVotes(uint32)\":{\"params\":{\"_proposalId\":\"The ID of the proposal to get quorum votes for\"},\"returns\":{\"_0\":\"uint256 The quantity of votes required to meet quorum\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateQuorumNumerator(uint256)\":{\"params\":{\"_quorumNumerator\":\"numerator to use when calculating quorum (over 1,000,000)\"}},\"updateRequiredProposerWeight(uint256)\":{\"params\":{\"_requiredProposerWeight\":\"required token voting weight\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8)\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"errors\":{\"InvalidQuorumNumerator()\":[{\"notice\":\"Ensures the numerator cannot be larger than the denominator. \"}]},\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"QUORUM_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating quorum (1,000,000). \"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getProposalVotingSupply(uint32)\":{\"notice\":\"Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails.\"},\"getVotingWeight(address,uint32)\":{\"notice\":\"Calculates the voting weight an address has for a specific Proposal.\"},\"hasVoted(uint32,address)\":{\"notice\":\"Returns whether an address has voted on the specified Proposal.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"meetsQuorum(uint256,uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes.\"},\"quorumNumerator()\":{\"notice\":\"The numerator to use when calculating quorum (adjustable). \"},\"quorumVotes(uint32)\":{\"notice\":\"Calculates the total number of votes required for a proposal to meet quorum. \"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"requiredProposerWeight()\":{\"notice\":\"Voting weight required to be able to submit Proposals. \"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateQuorumNumerator(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateRequiredProposerWeight(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8)\":{\"notice\":\"Casts votes for a Proposal, equal to the caller's token delegation.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":\"LinearERC20VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/azorius/BaseQuorumPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based quorums.\\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\\n */\\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating quorum (adjustable). */\\n uint256 public quorumNumerator;\\n\\n /** The denominator to use when calculating quorum (1,000,000). */\\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\\n\\n /** Ensures the numerator cannot be larger than the denominator. */\\n error InvalidQuorumNumerator();\\n\\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\\n\\n /** \\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\\n */\\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\\n _updateQuorumNumerator(_quorumNumerator);\\n }\\n\\n /** Internal implementation of `updateQuorumNumerator`. */\\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\\n if (_quorumNumerator > QUORUM_DENOMINATOR)\\n revert InvalidQuorumNumerator();\\n\\n quorumNumerator = _quorumNumerator;\\n\\n emit QuorumNumeratorUpdated(_quorumNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\\n * votes.\\n *\\n * @param _totalSupply the total supply of tokens\\n * @param _yesVotes number of votes in favor\\n * @param _abstainVotes number of votes abstaining\\n * @return bool whether the total number of yes votes + abstain meets the quorum\\n */\\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\\n }\\n\\n /**\\n * Calculates the total number of votes required for a proposal to meet quorum.\\n * \\n * @param _proposalId The ID of the proposal to get quorum votes for\\n * @return uint256 The quantity of votes required to meet quorum\\n */\\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x0218f97766d3b796f72e4ee0e1b267e72ccad8d979dfd14c5699f93d05c64c29\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC20VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IVotes} from \\\"@openzeppelin/contracts/governance/utils/IVotes.sol\\\";\\nimport {BaseStrategy, IBaseStrategy} from \\\"../BaseStrategy.sol\\\";\\nimport {BaseQuorumPercent} from \\\"../BaseQuorumPercent.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\\n *\\n * This contract is an extensible version of LinearERC20Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC20VotingExtensible is\\n BaseStrategy,\\n BaseQuorumPercent,\\n BaseVotingBasisPercent\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\\n }\\n\\n IVotes public governanceToken;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /** Voting weight required to be able to submit Proposals. */\\n uint256 public requiredProposerWeight;\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) internal proposalVotes;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n uint256 weight\\n );\\n\\n error InvalidProposal();\\n error VotingEnded();\\n error AlreadyVoted();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n IVotes _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _requiredProposerWeight,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (address, IVotes, address, uint32, uint256, uint256, uint256)\\n );\\n if (address(_governanceToken) == address(0))\\n revert InvalidTokenAddress();\\n\\n governanceToken = _governanceToken;\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumNumerator(_quorumNumerator);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _requiredProposerWeight required token voting weight\\n */\\n function updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) external virtual onlyOwner {\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n }\\n\\n /**\\n * Casts votes for a Proposal, equal to the caller's token delegation.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n */\\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\\n _vote(\\n _proposalId,\\n msg.sender,\\n _voteType,\\n getVotingWeight(msg.sender, _proposalId)\\n );\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock,\\n uint256 votingSupply\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n votingSupply = getProposalVotingSupply(_proposalId);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /**\\n * Returns whether an address has voted on the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal to check\\n * @param _address address to check\\n * @return bool true if the address has voted on the Proposal, otherwise false\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _address\\n ) public view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_address];\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n meetsQuorum(\\n getProposalVotingSupply(_proposalId),\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].abstainVotes\\n ) && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /**\\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\\n * not when it is being voted on passes / fails.\\n *\\n * @param _proposalId id of the Proposal\\n * @return uint256 voting supply snapshot for the given _proposalId\\n */\\n function getProposalVotingSupply(\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastTotalSupply(\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /**\\n * Calculates the voting weight an address has for a specific Proposal.\\n *\\n * @param _voter address of the voter\\n * @param _proposalId id of the Proposal\\n * @return uint256 the address' voting weight\\n */\\n function getVotingWeight(\\n address _voter,\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastVotes(\\n _voter,\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n return\\n governanceToken.getPastVotes(_address, block.number - 1) >=\\n requiredProposerWeight;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateRequiredProposerWeight`. */\\n function _updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) internal virtual {\\n requiredProposerWeight = _requiredProposerWeight;\\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _weight amount of voting weight cast, typically the\\n * total number of tokens delegated\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n uint256 _weight\\n ) internal virtual {\\n if (proposalVotes[_proposalId].votingEndBlock == 0)\\n revert InvalidProposal();\\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\\n revert VotingEnded();\\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\\n\\n proposalVotes[_proposalId].hasVoted[_voter] = true;\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposalVotes[_proposalId].noVotes += _weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposalVotes[_proposalId].yesVotes += _weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposalVotes[_proposalId].abstainVotes += _weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _weight);\\n }\\n\\n /** @inheritdoc BaseQuorumPercent*/\\n function quorumVotes(\\n uint32 _proposalId\\n ) public view virtual override returns (uint256) {\\n return\\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\\n QUORUM_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x18b46de302f756d61b4a47c65fae9b676a6352490739a643527ea5c0ccc2eea4\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {LinearERC20VotingExtensible} from \\\"./LinearERC20VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC20VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC20VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\\n * `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n {\\n (\\n address _owner,\\n address _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address,\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC20VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _governanceToken,\\n _azoriusModule,\\n _votingPeriod,\\n 0, // requiredProposerWeight is zero because we only care about the hat check\\n _quorumNumerator,\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0xa072c25a19494d97729e7b56dafa7a7b75caa3558620784ffef077af1f2f428a\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611b60806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getProposalVotingSupply(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "_0": "uint256 voting supply snapshot for the given _proposalId" + } + }, + "getVotingWeight(address,uint32)": { + "params": { + "_proposalId": "id of the Proposal", + "_voter": "address of the voter" + }, + "returns": { + "_0": "uint256 the address' voting weight" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address)": { + "params": { + "_address": "address to check", + "_proposalId": "id of the Proposal to check" + }, + "returns": { + "_0": "bool true if the address has voted on the Proposal, otherwise false" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "meetsQuorum(uint256,uint256,uint256)": { + "params": { + "_abstainVotes": "number of votes abstaining", + "_totalSupply": "the total supply of tokens", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the total number of yes votes + abstain meets the quorum" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "quorumVotes(uint32)": { + "params": { + "_proposalId": "The ID of the proposal to get quorum votes for" + }, + "returns": { + "_0": "uint256 The quantity of votes required to meet quorum" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateQuorumNumerator(uint256)": { + "params": { + "_quorumNumerator": "numerator to use when calculating quorum (over 1,000,000)" + } + }, + "updateRequiredProposerWeight(uint256)": { + "params": { + "_requiredProposerWeight": "required token voting weight" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8)": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "errors": { + "InvalidQuorumNumerator()": [ + { + "notice": "Ensures the numerator cannot be larger than the denominator. " + } + ] + }, + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "QUORUM_DENOMINATOR()": { + "notice": "The denominator to use when calculating quorum (1,000,000). " + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getProposalVotingSupply(uint32)": { + "notice": "Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails." + }, + "getVotingWeight(address,uint32)": { + "notice": "Calculates the voting weight an address has for a specific Proposal." + }, + "hasVoted(uint32,address)": { + "notice": "Returns whether an address has voted on the specified Proposal." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "meetsQuorum(uint256,uint256,uint256)": { + "notice": "Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes." + }, + "quorumNumerator()": { + "notice": "The numerator to use when calculating quorum (adjustable). " + }, + "quorumVotes(uint32)": { + "notice": "Calculates the total number of votes required for a proposal to meet quorum. " + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "requiredProposerWeight()": { + "notice": "Voting weight required to be able to submit Proposals. " + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateQuorumNumerator(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateRequiredProposerWeight(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8)": { + "notice": "Casts votes for a Proposal, equal to the caller's token delegation." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 801, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "quorumNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "105", + "type": "t_uint256" + }, + { + "astId": 1629, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "governanceToken", + "offset": 0, + "slot": "106", + "type": "t_contract(IVotes)663" + }, + { + "astId": 1632, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 20, + "slot": "106", + "type": "t_uint32" + }, + { + "astId": 1635, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "requiredProposerWeight", + "offset": 0, + "slot": "107", + "type": "t_uint256" + }, + { + "astId": 1641, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "108", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)" + } + ], + "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_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "t_contract(IVotes)663": { + "encoding": "inplace", + "label": "contract IVotes", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC20VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)1626_storage" + }, + "t_struct(ProposalVotes)1626_storage": { + "encoding": "inplace", + "label": "struct LinearERC20VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 1613, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1615, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1617, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 1619, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 1621, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 1625, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_bool)" + } + ], + "numberOfBytes": "160" + }, + "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/polygon/LinearERC721VotingWithHatsProposalCreation.json b/deployments/polygon/LinearERC721VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..6d13ee5 --- /dev/null +++ b/deployments/polygon/LinearERC721VotingWithHatsProposalCreation.json @@ -0,0 +1,1455 @@ +{ + "address": "0x647909caa27c25F3Aa996CE744D6Ac1eFb45F368", + "abi": [ + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdAlreadyVoted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdNotOwned", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParams", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotingWeight", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "TokenAlreadySet", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "GovernanceTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "GovernanceTokenRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposerThreshold", + "type": "uint256" + } + ], + "name": "ProposerThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumThreshold", + "type": "uint256" + } + ], + "name": "QuorumThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "tokenAddresses", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_weight", + "type": "uint256" + } + ], + "name": "addGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllTokenAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "getTokenWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint32", + "name": "votingStartBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposerThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "removeGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokenAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenWeights", + "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": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_proposerThreshold", + "type": "uint256" + } + ], + "name": "updateProposerThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumThreshold", + "type": "uint256" + } + ], + "name": "updateQuorumThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "_tokenAddresses", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe0b3006b1c8f0fc728be2bd8089ff7f5ecbde8c55eb28332723d797ec4c54a0f", + "receipt": { + "to": null, + "from": "0xb5Ca125166C1987A35EDD550E16846Fa1e1D9bB3", + "contractAddress": "0x647909caa27c25F3Aa996CE744D6Ac1eFb45F368", + "transactionIndex": 38, + "gasUsed": "1961378", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000008000000000000000000000000000000000000000000000200000000000800000000000000000000140020000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000080000000000000000000200000000000000000000000000400000000000000000000100000000000004000000000000000000001000000040000000000000000000000100004000000000000000000200000000000000000000000000000000000000000000020100001", + "blockHash": "0xafca3501c18bf01444478065aeaeb37805320b5254aaae10b7c330b1a825be2e", + "transactionHash": "0xe0b3006b1c8f0fc728be2bd8089ff7f5ecbde8c55eb28332723d797ec4c54a0f", + "logs": [ + { + "transactionIndex": 38, + "blockNumber": 63963530, + "transactionHash": "0xe0b3006b1c8f0fc728be2bd8089ff7f5ecbde8c55eb28332723d797ec4c54a0f", + "address": "0x647909caa27c25F3Aa996CE744D6Ac1eFb45F368", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 300, + "blockHash": "0xafca3501c18bf01444478065aeaeb37805320b5254aaae10b7c330b1a825be2e" + }, + { + "transactionIndex": 38, + "blockNumber": 63963530, + "transactionHash": "0xe0b3006b1c8f0fc728be2bd8089ff7f5ecbde8c55eb28332723d797ec4c54a0f", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000b5ca125166c1987a35edd550e16846fa1e1d9bb3", + "0x000000000000000000000000794e44d1334a56fea7f4df12633b88820d0c5888" + ], + "data": "0x0000000000000000000000000000000000000000000000000115ee9811f3b6320000000000000000000000000000000000000000000000002e3bce45ef5b4d490000000000000000000000000000000000000000000004add4da027e999d7bb50000000000000000000000000000000000000000000000002d25dfaddd6797170000000000000000000000000000000000000000000004add5eff116ab9131e7", + "logIndex": 301, + "blockHash": "0xafca3501c18bf01444478065aeaeb37805320b5254aaae10b7c330b1a825be2e" + } + ], + "blockNumber": 63963530, + "cumulativeGasUsed": "12240857", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdNotOwned\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoVotingWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"GovernanceTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"GovernanceTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"ProposerThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"QuorumThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokenAddresses\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_weight\",\"type\":\"uint256\"}],\"name\":\"addGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllTokenAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalVotes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"votingStartBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposerThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorumThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"removeGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenWeights\",\"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\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"updateProposerThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"updateQuorumThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"_tokenAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"addGovernanceToken(address,uint256)\":{\"params\":{\"_tokenAddress\":\"the address of the ERC-721 token\",\"_weight\":\"the number of votes each NFT id is worth\"}},\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getTokenWeight(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token address\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address,uint256)\":{\"params\":{\"_proposalId\":\"the id of the Proposal\",\"_tokenAddress\":\"the ERC-721 contract address\",\"_tokenId\":\"the unique id of the NFT\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeGovernanceToken(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token to remove\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateProposerThreshold(uint256)\":{\"params\":{\"_proposerThreshold\":\"required voting weight\"}},\"updateQuorumThreshold(uint256)\":{\"params\":{\"_quorumThreshold\":\"total voting weight required to achieve quorum\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8,address[],uint256[])\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_tokenAddresses\":\"list of ERC-721 addresses that correspond to ids in _tokenIds\",\"_tokenIds\":\"list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"addGovernanceToken(address,uint256)\":{\"notice\":\"Adds a new ERC-721 token as a governance token, along with its associated weight.\"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getAllTokenAddresses()\":{\"notice\":\"Returns whole list of governance tokens addresses\"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getTokenWeight(address)\":{\"notice\":\"Returns the current token weight for the given ERC-721 token address.\"},\"hasVoted(uint32,address,uint256)\":{\"notice\":\"Returns whether an NFT id has already voted.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"proposalVotes(uint256)\":{\"notice\":\"`proposalId` to `ProposalVotes`, the voting state of a Proposal. \"},\"proposerThreshold()\":{\"notice\":\"The minimum number of voting power required to create a new proposal.\"},\"quorumThreshold()\":{\"notice\":\"The total number of votes required to achieve quorum. \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this.\"},\"removeGovernanceToken(address)\":{\"notice\":\"Removes the given ERC-721 token address from the list of governance tokens.\"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"tokenAddresses(uint256)\":{\"notice\":\"The list of ERC-721 tokens that can vote. \"},\"tokenWeights(address)\":{\"notice\":\"ERC-721 address to its voting weight per NFT id. \"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateProposerThreshold(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateQuorumThreshold(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8,address[],uint256[])\":{\"notice\":\"Submits a vote on an existing Proposal.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":\"LinearERC721VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"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/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IERC721VotingStrategy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\n/**\\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\\n * voting strategy.\\n */\\ninterface IERC721VotingStrategy {\\n\\n /**\\n * Returns the current token weight for the given ERC-721 token address.\\n *\\n * @param _tokenAddress the ERC-721 token address\\n */\\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa51db3de9ceb151077007952031ac96263b8138c8ae74758f98a4d5bd71fa86c\",\"license\":\"MIT\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC721VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {IERC721VotingStrategy} from \\\"../interfaces/IERC721VotingStrategy.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\nimport {IAzorius} from \\\"../interfaces/IAzorius.sol\\\";\\nimport {BaseStrategy} from \\\"../BaseStrategy.sol\\\";\\n\\n/**\\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\\n * each with their own voting weight.\\n *\\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\\n *\\n * Also, this uses \\\"quorumThreshold\\\" rather than LinearERC20Voting's quorumPercent, because the\\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\\n * \\\"total signers\\\" required, rather than a percentage of the tokens.\\n *\\n * This contract is an extensible version of LinearERC721Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC721VotingExtensible is\\n BaseStrategy,\\n BaseVotingBasisPercent,\\n IERC721VotingStrategy\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n /**\\n * ERC-721 contract address to individual NFT id to bool\\n * of whether it has voted on this proposal.\\n */\\n mapping(address => mapping(uint256 => bool)) hasVoted;\\n }\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) public proposalVotes;\\n\\n /** The list of ERC-721 tokens that can vote. */\\n address[] public tokenAddresses;\\n\\n /** ERC-721 address to its voting weight per NFT id. */\\n mapping(address => uint256) public tokenWeights;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /**\\n * The total number of votes required to achieve quorum.\\n * \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no\\n * totalSupply function, so the contract cannot determine this.\\n */\\n uint256 public quorumThreshold;\\n\\n /**\\n * The minimum number of voting power required to create a new proposal.\\n */\\n uint256 public proposerThreshold;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event QuorumThresholdUpdated(uint256 quorumThreshold);\\n event ProposerThresholdUpdated(uint256 proposerThreshold);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n address[] tokenAddresses,\\n uint256[] tokenIds\\n );\\n event GovernanceTokenAdded(address token, uint256 weight);\\n event GovernanceTokenRemoved(address token);\\n\\n error InvalidParams();\\n error InvalidProposal();\\n error VotingEnded();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n error NoVotingWeight();\\n error TokenAlreadySet();\\n error TokenNotSet();\\n error IdAlreadyVoted(uint256 tokenId);\\n error IdNotOwned(uint256 tokenId);\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _proposerThreshold,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n uint256\\n )\\n );\\n\\n if (_tokens.length != _weights.length) {\\n revert InvalidParams();\\n }\\n\\n for (uint i = 0; i < _tokens.length; ) {\\n _addGovernanceToken(_tokens[i], _weights[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumThreshold(_quorumThreshold);\\n _updateProposerThreshold(_proposerThreshold);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\\n *\\n * @param _tokenAddress the address of the ERC-721 token\\n * @param _weight the number of votes each NFT id is worth\\n */\\n function addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) external virtual onlyOwner {\\n _addGovernanceToken(_tokenAddress, _weight);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumThreshold total voting weight required to achieve quorum\\n */\\n function updateQuorumThreshold(\\n uint256 _quorumThreshold\\n ) external virtual onlyOwner {\\n _updateQuorumThreshold(_quorumThreshold);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _proposerThreshold required voting weight\\n */\\n function updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) external virtual onlyOwner {\\n _updateProposerThreshold(_proposerThreshold);\\n }\\n\\n /**\\n * Returns whole list of governance tokens addresses\\n */\\n function getAllTokenAddresses()\\n external\\n view\\n virtual\\n returns (address[] memory)\\n {\\n return tokenAddresses;\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /**\\n * Submits a vote on an existing Proposal.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function vote(\\n uint32 _proposalId,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) external virtual {\\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\\n }\\n\\n /** @inheritdoc IERC721VotingStrategy*/\\n function getTokenWeight(\\n address _tokenAddress\\n ) external view virtual override returns (uint256) {\\n return tokenWeights[_tokenAddress];\\n }\\n\\n /**\\n * Returns whether an NFT id has already voted.\\n *\\n * @param _proposalId the id of the Proposal\\n * @param _tokenAddress the ERC-721 contract address\\n * @param _tokenId the unique id of the NFT\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _tokenAddress,\\n uint256 _tokenId\\n ) external view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\\n }\\n\\n /**\\n * Removes the given ERC-721 token address from the list of governance tokens.\\n *\\n * @param _tokenAddress the ERC-721 token to remove\\n */\\n function removeGovernanceToken(\\n address _tokenAddress\\n ) external virtual onlyOwner {\\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\\n\\n tokenWeights[_tokenAddress] = 0;\\n\\n uint256 length = tokenAddresses.length;\\n for (uint256 i = 0; i < length; ) {\\n if (_tokenAddress == tokenAddresses[i]) {\\n uint256 last = length - 1;\\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\\n delete tokenAddresses[last]; // delete the last token\\n break;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit GovernanceTokenRemoved(_tokenAddress);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n quorumThreshold <=\\n proposalVotes[_proposalId].yesVotes +\\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n uint256 totalWeight = 0;\\n for (uint i = 0; i < tokenAddresses.length; ) {\\n address tokenAddress = tokenAddresses[i];\\n totalWeight +=\\n IERC721(tokenAddress).balanceOf(_address) *\\n tokenWeights[tokenAddress];\\n unchecked {\\n ++i;\\n }\\n }\\n return totalWeight >= proposerThreshold;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `addGovernanceToken` */\\n function _addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) internal virtual {\\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\\n revert InvalidTokenAddress();\\n\\n if (_weight == 0) revert NoVotingWeight();\\n\\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\\n\\n tokenAddresses.push(_tokenAddress);\\n tokenWeights[_tokenAddress] = _weight;\\n\\n emit GovernanceTokenAdded(_tokenAddress, _weight);\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateQuorumThreshold`. */\\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\\n quorumThreshold = _quorumThreshold;\\n emit QuorumThresholdUpdated(quorumThreshold);\\n }\\n\\n /** Internal implementation of `updateProposerThreshold`. */\\n function _updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) internal virtual {\\n proposerThreshold = _proposerThreshold;\\n emit ProposerThresholdUpdated(_proposerThreshold);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) internal virtual {\\n uint256 weight;\\n\\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\\n // to vote twice if you get more weight later on\\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\\n address tokenAddress = _tokenAddresses[i];\\n uint256 tokenId = _tokenIds[i];\\n\\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\\n revert IdNotOwned(tokenId);\\n }\\n\\n if (\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\\n true\\n ) {\\n revert IdAlreadyVoted(tokenId);\\n }\\n\\n weight += tokenWeights[tokenAddress];\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (weight == 0) revert NoVotingWeight();\\n\\n ProposalVotes storage proposal = proposalVotes[_proposalId];\\n\\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\\n\\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposal.noVotes += weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposal.yesVotes += weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposal.abstainVotes += weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\\n }\\n}\\n\",\"keccak256\":\"0xd4080f58d0b3abe47b825f0b43fc5061143319a93de5ff8752b6591d3effef75\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {LinearERC721VotingExtensible} from \\\"./LinearERC721VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC721VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC721VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC721VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _tokens,\\n _weights,\\n _azoriusModule,\\n _votingPeriod,\\n _quorumThreshold,\\n 0, // _proposerThreshold is zero because we only care about the hat check\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0x78f0f627fe0f63c7d1ae8ec0333f0e55d801412f34b7597b12e9007a23fcd0d7\",\"license\":\"MIT\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61220680620000ee6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "addGovernanceToken(address,uint256)": { + "params": { + "_tokenAddress": "the address of the ERC-721 token", + "_weight": "the number of votes each NFT id is worth" + } + }, + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getTokenWeight(address)": { + "params": { + "_tokenAddress": "the ERC-721 token address" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address,uint256)": { + "params": { + "_proposalId": "the id of the Proposal", + "_tokenAddress": "the ERC-721 contract address", + "_tokenId": "the unique id of the NFT" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "removeGovernanceToken(address)": { + "params": { + "_tokenAddress": "the ERC-721 token to remove" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateProposerThreshold(uint256)": { + "params": { + "_proposerThreshold": "required voting weight" + } + }, + "updateQuorumThreshold(uint256)": { + "params": { + "_quorumThreshold": "total voting weight required to achieve quorum" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8,address[],uint256[])": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_tokenAddresses": "list of ERC-721 addresses that correspond to ids in _tokenIds", + "_tokenIds": "list of unique token ids that correspond to their ERC-721 address in _tokenAddresses", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "addGovernanceToken(address,uint256)": { + "notice": "Adds a new ERC-721 token as a governance token, along with its associated weight." + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getAllTokenAddresses()": { + "notice": "Returns whole list of governance tokens addresses" + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getTokenWeight(address)": { + "notice": "Returns the current token weight for the given ERC-721 token address." + }, + "hasVoted(uint32,address,uint256)": { + "notice": "Returns whether an NFT id has already voted." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "proposalVotes(uint256)": { + "notice": "`proposalId` to `ProposalVotes`, the voting state of a Proposal. " + }, + "proposerThreshold()": { + "notice": "The minimum number of voting power required to create a new proposal." + }, + "quorumThreshold()": { + "notice": "The total number of votes required to achieve quorum. \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this." + }, + "removeGovernanceToken(address)": { + "notice": "Removes the given ERC-721 token address from the list of governance tokens." + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "tokenAddresses(uint256)": { + "notice": "The list of ERC-721 tokens that can vote. " + }, + "tokenWeights(address)": { + "notice": "ERC-721 address to its voting weight per NFT id. " + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateProposerThreshold(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateQuorumThreshold(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8,address[],uint256[])": { + "notice": "Submits a vote on an existing Proposal." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 2378, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)" + }, + { + "astId": 2382, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenAddresses", + "offset": 0, + "slot": "106", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 2387, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenWeights", + "offset": 0, + "slot": "107", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2390, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 0, + "slot": "108", + "type": "t_uint32" + }, + { + "astId": 2393, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "quorumThreshold", + "offset": 0, + "slot": "109", + "type": "t_uint256" + }, + { + "astId": 2396, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposerThreshold", + "offset": 0, + "slot": "110", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "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_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => 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_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC721VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)2372_storage" + }, + "t_struct(ProposalVotes)2372_storage": { + "encoding": "inplace", + "label": "struct LinearERC721VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 2356, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2358, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2360, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2362, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 2364, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2371, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))" + } + ], + "numberOfBytes": "160" + }, + "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/polygon/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json b/deployments/polygon/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json new file mode 100644 index 0000000..df3a3a7 --- /dev/null +++ b/deployments/polygon/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json @@ -0,0 +1,107 @@ +{ + "language": "Solidity", + "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" + }, + "@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/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" + }, + "@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/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/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\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/azorius/BaseQuorumPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based quorums.\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\n */\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating quorum (adjustable). */\n uint256 public quorumNumerator;\n\n /** The denominator to use when calculating quorum (1,000,000). */\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\n\n /** Ensures the numerator cannot be larger than the denominator. */\n error InvalidQuorumNumerator();\n\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\n\n /** \n * Updates the quorum required for future Proposals.\n *\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\n */\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\n _updateQuorumNumerator(_quorumNumerator);\n }\n\n /** Internal implementation of `updateQuorumNumerator`. */\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\n if (_quorumNumerator > QUORUM_DENOMINATOR)\n revert InvalidQuorumNumerator();\n\n quorumNumerator = _quorumNumerator;\n\n emit QuorumNumeratorUpdated(_quorumNumerator);\n }\n\n /**\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\n * votes.\n *\n * @param _totalSupply the total supply of tokens\n * @param _yesVotes number of votes in favor\n * @param _abstainVotes number of votes abstaining\n * @return bool whether the total number of yes votes + abstain meets the quorum\n */\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\n }\n\n /**\n * Calculates the total number of votes required for a proposal to meet quorum.\n * \n * @param _proposalId The ID of the proposal to get quorum votes for\n * @return uint256 The quantity of votes required to meet quorum\n */\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\n}\n" + }, + "contracts/azorius/BaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { IAzorius } from \"./interfaces/IAzorius.sol\";\nimport { IBaseStrategy } from \"./interfaces/IBaseStrategy.sol\";\nimport { FactoryFriendly } from \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * The base abstract contract for all voting strategies in Azorius.\n */\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\n\n event AzoriusSet(address indexed azoriusModule);\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\n\n error OnlyAzorius();\n\n IAzorius public azoriusModule;\n\n /**\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\n */\n modifier onlyAzorius() {\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\n _;\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /** @inheritdoc IBaseStrategy*/\n function setAzorius(address _azoriusModule) external onlyOwner {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n\n /** @inheritdoc IBaseStrategy*/\n function initializeProposal(bytes memory _data) external virtual;\n\n /** @inheritdoc IBaseStrategy*/\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function isProposer(address _address) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\n\n /**\n * Sets the address of the [Azorius](Azorius.md) module contract.\n *\n * @param _azoriusModule address of the Azorius module\n */\n function _setAzorius(address _azoriusModule) internal {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n}\n" + }, + "contracts/azorius/BaseVotingBasisPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based voting basis calculations.\n *\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\n *\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\n * See https://en.wikipedia.org/wiki/Supermajority.\n */\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating basis (adjustable). */\n uint256 public basisNumerator;\n\n /** The denominator to use when calculating basis (1,000,000). */\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\n\n error InvalidBasisNumerator();\n\n event BasisNumeratorUpdated(uint256 basisNumerator);\n\n /**\n * Updates the `basisNumerator` for future Proposals.\n *\n * @param _basisNumerator numerator to use\n */\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\n _updateBasisNumerator(_basisNumerator);\n }\n\n /** Internal implementation of `updateBasisNumerator`. */\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\n revert InvalidBasisNumerator();\n\n basisNumerator = _basisNumerator;\n\n emit BasisNumeratorUpdated(_basisNumerator);\n }\n\n /**\n * Calculates whether a vote meets its basis.\n *\n * @param _yesVotes number of votes in favor\n * @param _noVotes number of votes against\n * @return bool whether the yes votes meets the set basis\n */\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/interfaces/IAzorius.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport { Enum } from \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\n/**\n * The base interface for the Azorius governance Safe module.\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\n *\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\n *\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\n * as customizable as possible.\n *\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\n *\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\n * for the duration of its voting period.\n *\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\n * it cannot yet be executed. This is to allow time for token holders\n * to potentially exit their position, as well as parent DAOs time to\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\n * for the duration of its `timelockPeriod`.\n *\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\n * and can then finally be executed on chain by anyone.\n *\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\n * on the blockchain.\n *\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\n * elapsed will be `EXPIRED`, and can no longer be executed.\n *\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \n * `isPassed` function). For a basic strategy, this would mean it received more \n * NO votes than YES or did not achieve quorum. \n */\ninterface IAzorius {\n\n /** Represents a transaction to perform on the blockchain. */\n struct Transaction {\n address to; // destination address of the transaction\n uint256 value; // amount of ETH to transfer with the transaction\n bytes data; // encoded function call data of the transaction\n Enum.Operation operation; // Operation type, Call or DelegateCall\n }\n\n /** Holds details pertaining to a single proposal. */\n struct Proposal {\n uint32 executionCounter; // count of transactions that have been executed within the proposal\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\n address strategy; // BaseStrategy contract this proposal was created on\n bytes32[] txHashes; // hashes of the transactions that are being proposed\n }\n\n /** The list of states in which a Proposal can be in at any given time. */\n enum ProposalState {\n ACTIVE,\n TIMELOCKED,\n EXECUTABLE,\n EXECUTED,\n EXPIRED,\n FAILED\n }\n\n /**\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\n *\n * Multiple strategies can be enabled, and new Proposals will be able to be\n * created using any of the currently enabled strategies.\n *\n * @param _strategy contract address of the BaseStrategy to be enabled\n */\n function enableStrategy(address _strategy) external;\n\n /**\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\n * @param _strategy address of the BaseStrategy to be removed\n */\n function disableStrategy(address _prevStrategy, address _strategy) external;\n\n /**\n * Updates the `timelockPeriod` for newly created Proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\n */\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\n\n /**\n * Updates the execution period for future Proposals.\n *\n * @param _executionPeriod new execution period (in blocks)\n */\n function updateExecutionPeriod(uint32 _executionPeriod) external;\n\n /**\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\n * New Proposals begin immediately in the `ACTIVE` state.\n *\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \n * but is included in case future strategy contracts have a need for it\n * @param _transactions array of transactions to propose\n * @param _metadata additional data such as a title/description to submit with the proposal\n */\n function submitProposal(\n address _strategy,\n bytes memory _data,\n Transaction[] calldata _transactions,\n string calldata _metadata\n ) external;\n\n /**\n * Executes all transactions within a Proposal.\n * This will only be able to be called if the Proposal passed.\n *\n * @param _proposalId identifier of the Proposal\n * @param _targets target contracts for each transaction\n * @param _values ETH values to be sent with each transaction\n * @param _data transaction data to be executed\n * @param _operations Calls or Delegatecalls\n */\n function executeProposal(\n uint32 _proposalId,\n address[] memory _targets,\n uint256[] memory _values,\n bytes[] memory _data,\n Enum.Operation[] memory _operations\n ) external;\n\n /**\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\n *\n * @param _strategy contract address of the BaseStrategy to check\n * @return bool True if the strategy is enabled, otherwise False\n */\n function isStrategyEnabled(address _strategy) external view returns (bool);\n\n /**\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\n * Because the list of BaseStrategies is technically unbounded, this\n * requires the address of the first strategy you would like, along\n * with the total count of strategies to return, rather than\n * returning the whole list at once.\n *\n * @param _startAddress contract address of the BaseStrategy to start with\n * @param _count maximum number of BaseStrategies that should be returned\n * @return _strategies array of BaseStrategies\n * @return _next next BaseStrategy contract address in the linked list\n */\n function getStrategies(\n address _startAddress,\n uint256 _count\n ) external view returns (address[] memory _strategies, address _next);\n\n /**\n * Gets the state of a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return ProposalState uint256 ProposalState enum value representing the\n * current state of the proposal\n */\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\n\n /**\n * Generates the data for the module transaction hash (required for signing).\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @param _nonce Safe nonce of the transaction\n * @return bytes hashed transaction data\n */\n function generateTxHashData(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation,\n uint256 _nonce\n ) external view returns (bytes memory);\n\n /**\n * Returns the `keccak256` hash of the specified transaction.\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @return bytes32 transaction hash\n */\n function getTxHash(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation\n ) external view returns (bytes32);\n\n /**\n * Returns the hash of a transaction in a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @param _txIndex index of the transaction within the Proposal\n * @return bytes32 hash of the specified transaction\n */\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\n\n /**\n * Returns the transaction hashes associated with a given `proposalId`.\n *\n * @param _proposalId identifier of the Proposal to get transaction hashes for\n * @return bytes32[] array of transaction hashes\n */\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\n\n /**\n * Returns details about the specified Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return _strategy address of the BaseStrategy contract the Proposal is on\n * @return _txHashes hashes of the transactions the Proposal contains\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\n */\n function getProposal(uint32 _proposalId) external view\n returns (\n address _strategy,\n bytes32[] memory _txHashes,\n uint32 _timelockPeriod,\n uint32 _executionPeriod,\n uint32 _executionCounter\n );\n}\n" + }, + "contracts/azorius/interfaces/IBaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\n/**\n * The specification for a voting strategy in Azorius.\n *\n * Each IBaseStrategy implementation need only implement the given functions here,\n * which allows for highly composable but simple or complex voting strategies.\n *\n * It should be noted that while many voting strategies make use of parameters such as\n * voting period or quorum, that is a detail of the individual strategy itself, and not\n * a requirement for the Azorius protocol.\n */\ninterface IBaseStrategy {\n\n /**\n * Sets the address of the [Azorius](../Azorius.md) contract this \n * [BaseStrategy](../BaseStrategy.md) is being used on.\n *\n * @param _azoriusModule address of the Azorius Safe module\n */\n function setAzorius(address _azoriusModule) external;\n\n /**\n * Called by the [Azorius](../Azorius.md) module. This notifies this \n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\n *\n * @param _data arbitrary data to pass to this BaseStrategy\n */\n function initializeProposal(bytes memory _data) external;\n\n /**\n * Returns whether a Proposal has been passed.\n *\n * @param _proposalId proposalId to check\n * @return bool true if the proposal has passed, otherwise false\n */\n function isPassed(uint32 _proposalId) external view returns (bool);\n\n /**\n * Returns whether the specified address can submit a Proposal with\n * this [BaseStrategy](../BaseStrategy.md).\n *\n * This allows a BaseStrategy to place any limits it would like on\n * who can create new Proposals, such as requiring a minimum token\n * delegation.\n *\n * @param _address address to check\n * @return bool true if the address can submit a Proposal, otherwise false\n */\n function isProposer(address _address) external view returns (bool);\n\n /**\n * Returns the block number voting ends on a given Proposal.\n *\n * @param _proposalId proposalId to check\n * @return uint32 block number when voting ends on the Proposal\n */\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\n}\n" + }, + "contracts/azorius/interfaces/IERC721VotingStrategy.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\n/**\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\n * voting strategy.\n */\ninterface IERC721VotingStrategy {\n\n /**\n * Returns the current token weight for the given ERC-721 token address.\n *\n * @param _tokenAddress the ERC-721 token address\n */\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\n}\n" + }, + "contracts/azorius/strategies/HatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\n event HatWhitelisted(uint256 hatId);\n event HatRemovedFromWhitelist(uint256 hatId);\n\n IHats public hatsContract;\n\n /** Array to store whitelisted Hat IDs. */\n uint256[] private whitelistedHatIds;\n\n error InvalidHatsContract();\n error NoHatsWhitelisted();\n error HatAlreadyWhitelisted();\n error HatNotWhitelisted();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters:\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(bytes memory initializeParams) public virtual {\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\n .decode(initializeParams, (address, uint256[]));\n\n if (_hatsContract == address(0)) revert InvalidHatsContract();\n hatsContract = IHats(_hatsContract);\n\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\n _whitelistHat(_initialWhitelistedHats[i]);\n }\n }\n\n /**\n * Adds a Hat to the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to whitelist\n */\n function whitelistHat(uint256 _hatId) external onlyOwner {\n _whitelistHat(_hatId);\n }\n\n /**\n * Internal function to add a Hat to the whitelist.\n * @param _hatId The ID of the Hat to whitelist\n */\n function _whitelistHat(uint256 _hatId) internal {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\n }\n whitelistedHatIds.push(_hatId);\n emit HatWhitelisted(_hatId);\n }\n\n /**\n * Removes a Hat from the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to remove from the whitelist\n */\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\n bool found = false;\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) {\n whitelistedHatIds[i] = whitelistedHatIds[\n whitelistedHatIds.length - 1\n ];\n whitelistedHatIds.pop();\n found = true;\n break;\n }\n }\n if (!found) revert HatNotWhitelisted();\n\n emit HatRemovedFromWhitelist(_hatId);\n }\n\n /**\n * @dev Checks if an address is authorized to create proposals.\n * @param _address The address to check for proposal creation authorization.\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\n * @notice This function overrides the isProposer function from the parent contract.\n * It iterates through all whitelisted Hat IDs and checks if the given address\n * is wearing any of them using the Hats Protocol.\n */\n function isProposer(address _address) public view virtual returns (bool) {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @dev Returns the IDs of all whitelisted Hats.\n * @return uint256[] memory An array of whitelisted Hat IDs.\n */\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\n return whitelistedHatIds;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IVotes} from \"@openzeppelin/contracts/governance/utils/IVotes.sol\";\nimport {BaseStrategy, IBaseStrategy} from \"../BaseStrategy.sol\";\nimport {BaseQuorumPercent} from \"../BaseQuorumPercent.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\n *\n * This contract is an extensible version of LinearERC20Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC20VotingExtensible is\n BaseStrategy,\n BaseQuorumPercent,\n BaseVotingBasisPercent\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\n }\n\n IVotes public governanceToken;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /** Voting weight required to be able to submit Proposals. */\n uint256 public requiredProposerWeight;\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) internal proposalVotes;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n uint256 weight\n );\n\n error InvalidProposal();\n error VotingEnded();\n error AlreadyVoted();\n error InvalidVote();\n error InvalidTokenAddress();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n IVotes _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _requiredProposerWeight,\n uint256 _quorumNumerator,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (address, IVotes, address, uint32, uint256, uint256, uint256)\n );\n if (address(_governanceToken) == address(0))\n revert InvalidTokenAddress();\n\n governanceToken = _governanceToken;\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumNumerator(_quorumNumerator);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n _updateRequiredProposerWeight(_requiredProposerWeight);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _requiredProposerWeight required token voting weight\n */\n function updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) external virtual onlyOwner {\n _updateRequiredProposerWeight(_requiredProposerWeight);\n }\n\n /**\n * Casts votes for a Proposal, equal to the caller's token delegation.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n */\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\n _vote(\n _proposalId,\n msg.sender,\n _voteType,\n getVotingWeight(msg.sender, _proposalId)\n );\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock,\n uint256 votingSupply\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n votingSupply = getProposalVotingSupply(_proposalId);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /**\n * Returns whether an address has voted on the specified Proposal.\n *\n * @param _proposalId id of the Proposal to check\n * @param _address address to check\n * @return bool true if the address has voted on the Proposal, otherwise false\n */\n function hasVoted(\n uint32 _proposalId,\n address _address\n ) public view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_address];\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n meetsQuorum(\n getProposalVotingSupply(_proposalId),\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].abstainVotes\n ) && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /**\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\n * not when it is being voted on passes / fails.\n *\n * @param _proposalId id of the Proposal\n * @return uint256 voting supply snapshot for the given _proposalId\n */\n function getProposalVotingSupply(\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastTotalSupply(\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /**\n * Calculates the voting weight an address has for a specific Proposal.\n *\n * @param _voter address of the voter\n * @param _proposalId id of the Proposal\n * @return uint256 the address' voting weight\n */\n function getVotingWeight(\n address _voter,\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastVotes(\n _voter,\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n return\n governanceToken.getPastVotes(_address, block.number - 1) >=\n requiredProposerWeight;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateRequiredProposerWeight`. */\n function _updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) internal virtual {\n requiredProposerWeight = _requiredProposerWeight;\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _weight amount of voting weight cast, typically the\n * total number of tokens delegated\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n uint256 _weight\n ) internal virtual {\n if (proposalVotes[_proposalId].votingEndBlock == 0)\n revert InvalidProposal();\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\n revert VotingEnded();\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\n\n proposalVotes[_proposalId].hasVoted[_voter] = true;\n\n if (_voteType == uint8(VoteType.NO)) {\n proposalVotes[_proposalId].noVotes += _weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposalVotes[_proposalId].yesVotes += _weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposalVotes[_proposalId].abstainVotes += _weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _weight);\n }\n\n /** @inheritdoc BaseQuorumPercent*/\n function quorumVotes(\n uint32 _proposalId\n ) public view virtual override returns (uint256) {\n return\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\n QUORUM_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {LinearERC20VotingExtensible} from \"./LinearERC20VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC20VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC20VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\n * `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n {\n (\n address _owner,\n address _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumNumerator,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address,\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC20VotingExtensible.setUp(\n abi.encode(\n _owner,\n _governanceToken,\n _azoriusModule,\n _votingPeriod,\n 0, // requiredProposerWeight is zero because we only care about the hat check\n _quorumNumerator,\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {IERC721VotingStrategy} from \"../interfaces/IERC721VotingStrategy.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\nimport {IAzorius} from \"../interfaces/IAzorius.sol\";\nimport {BaseStrategy} from \"../BaseStrategy.sol\";\n\n/**\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\n * each with their own voting weight.\n *\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\n *\n * Also, this uses \"quorumThreshold\" rather than LinearERC20Voting's quorumPercent, because the\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\n * \"total signers\" required, rather than a percentage of the tokens.\n *\n * This contract is an extensible version of LinearERC721Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC721VotingExtensible is\n BaseStrategy,\n BaseVotingBasisPercent,\n IERC721VotingStrategy\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n /**\n * ERC-721 contract address to individual NFT id to bool\n * of whether it has voted on this proposal.\n */\n mapping(address => mapping(uint256 => bool)) hasVoted;\n }\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) public proposalVotes;\n\n /** The list of ERC-721 tokens that can vote. */\n address[] public tokenAddresses;\n\n /** ERC-721 address to its voting weight per NFT id. */\n mapping(address => uint256) public tokenWeights;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /**\n * The total number of votes required to achieve quorum.\n * \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no\n * totalSupply function, so the contract cannot determine this.\n */\n uint256 public quorumThreshold;\n\n /**\n * The minimum number of voting power required to create a new proposal.\n */\n uint256 public proposerThreshold;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event QuorumThresholdUpdated(uint256 quorumThreshold);\n event ProposerThresholdUpdated(uint256 proposerThreshold);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n address[] tokenAddresses,\n uint256[] tokenIds\n );\n event GovernanceTokenAdded(address token, uint256 weight);\n event GovernanceTokenRemoved(address token);\n\n error InvalidParams();\n error InvalidProposal();\n error VotingEnded();\n error InvalidVote();\n error InvalidTokenAddress();\n error NoVotingWeight();\n error TokenAlreadySet();\n error TokenNotSet();\n error IdAlreadyVoted(uint256 tokenId);\n error IdNotOwned(uint256 tokenId);\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _proposerThreshold,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n uint256\n )\n );\n\n if (_tokens.length != _weights.length) {\n revert InvalidParams();\n }\n\n for (uint i = 0; i < _tokens.length; ) {\n _addGovernanceToken(_tokens[i], _weights[i]);\n unchecked {\n ++i;\n }\n }\n\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumThreshold(_quorumThreshold);\n _updateProposerThreshold(_proposerThreshold);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\n *\n * @param _tokenAddress the address of the ERC-721 token\n * @param _weight the number of votes each NFT id is worth\n */\n function addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) external virtual onlyOwner {\n _addGovernanceToken(_tokenAddress, _weight);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the quorum required for future Proposals.\n *\n * @param _quorumThreshold total voting weight required to achieve quorum\n */\n function updateQuorumThreshold(\n uint256 _quorumThreshold\n ) external virtual onlyOwner {\n _updateQuorumThreshold(_quorumThreshold);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _proposerThreshold required voting weight\n */\n function updateProposerThreshold(\n uint256 _proposerThreshold\n ) external virtual onlyOwner {\n _updateProposerThreshold(_proposerThreshold);\n }\n\n /**\n * Returns whole list of governance tokens addresses\n */\n function getAllTokenAddresses()\n external\n view\n virtual\n returns (address[] memory)\n {\n return tokenAddresses;\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n }\n\n /**\n * Submits a vote on an existing Proposal.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function vote(\n uint32 _proposalId,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) external virtual {\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\n }\n\n /** @inheritdoc IERC721VotingStrategy*/\n function getTokenWeight(\n address _tokenAddress\n ) external view virtual override returns (uint256) {\n return tokenWeights[_tokenAddress];\n }\n\n /**\n * Returns whether an NFT id has already voted.\n *\n * @param _proposalId the id of the Proposal\n * @param _tokenAddress the ERC-721 contract address\n * @param _tokenId the unique id of the NFT\n */\n function hasVoted(\n uint32 _proposalId,\n address _tokenAddress,\n uint256 _tokenId\n ) external view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\n }\n\n /**\n * Removes the given ERC-721 token address from the list of governance tokens.\n *\n * @param _tokenAddress the ERC-721 token to remove\n */\n function removeGovernanceToken(\n address _tokenAddress\n ) external virtual onlyOwner {\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\n\n tokenWeights[_tokenAddress] = 0;\n\n uint256 length = tokenAddresses.length;\n for (uint256 i = 0; i < length; ) {\n if (_tokenAddress == tokenAddresses[i]) {\n uint256 last = length - 1;\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\n delete tokenAddresses[last]; // delete the last token\n break;\n }\n unchecked {\n ++i;\n }\n }\n\n emit GovernanceTokenRemoved(_tokenAddress);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n quorumThreshold <=\n proposalVotes[_proposalId].yesVotes +\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n uint256 totalWeight = 0;\n for (uint i = 0; i < tokenAddresses.length; ) {\n address tokenAddress = tokenAddresses[i];\n totalWeight +=\n IERC721(tokenAddress).balanceOf(_address) *\n tokenWeights[tokenAddress];\n unchecked {\n ++i;\n }\n }\n return totalWeight >= proposerThreshold;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `addGovernanceToken` */\n function _addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) internal virtual {\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\n revert InvalidTokenAddress();\n\n if (_weight == 0) revert NoVotingWeight();\n\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\n\n tokenAddresses.push(_tokenAddress);\n tokenWeights[_tokenAddress] = _weight;\n\n emit GovernanceTokenAdded(_tokenAddress, _weight);\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateQuorumThreshold`. */\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\n quorumThreshold = _quorumThreshold;\n emit QuorumThresholdUpdated(quorumThreshold);\n }\n\n /** Internal implementation of `updateProposerThreshold`. */\n function _updateProposerThreshold(\n uint256 _proposerThreshold\n ) internal virtual {\n proposerThreshold = _proposerThreshold;\n emit ProposerThresholdUpdated(_proposerThreshold);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) internal virtual {\n uint256 weight;\n\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\n // to vote twice if you get more weight later on\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\n address tokenAddress = _tokenAddresses[i];\n uint256 tokenId = _tokenIds[i];\n\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\n revert IdNotOwned(tokenId);\n }\n\n if (\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\n true\n ) {\n revert IdAlreadyVoted(tokenId);\n }\n\n weight += tokenWeights[tokenAddress];\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\n unchecked {\n ++i;\n }\n }\n\n if (weight == 0) revert NoVotingWeight();\n\n ProposalVotes storage proposal = proposalVotes[_proposalId];\n\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\n\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\n\n if (_voteType == uint8(VoteType.NO)) {\n proposal.noVotes += weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposal.yesVotes += weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposal.abstainVotes += weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {LinearERC721VotingExtensible} from \"./LinearERC721VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC721VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC721VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC721VotingExtensible.setUp(\n abi.encode(\n _owner,\n _tokens,\n _weights,\n _azoriusModule,\n _votingPeriod,\n _quorumThreshold,\n 0, // _proposerThreshold is zero because we only care about the hat check\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/interfaces/hats/HatsErrors.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsErrors {\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\n error NotAdmin(address user, uint256 hatId);\n\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\n error NotHatWearer();\n\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\n error NotAdminOrWearer();\n\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\n error AllHatsWorn(uint256 hatId);\n\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\n error MaxLevelsReached();\n\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\n error InvalidHatId();\n\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\n error AlreadyWearingHat(address wearer, uint256 hatId);\n\n /// @notice Emitted when attempting to mint a non-existant hat\n error HatDoesNotExist(uint256 hatId);\n\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\n error HatNotActive();\n\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\n error NotEligible();\n\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\n error NotHatsToggle();\n\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\n error NotHatsEligibility();\n\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\n error BatchArrayLengthMismatch();\n\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\n error Immutable();\n\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\n error NewMaxSupplyTooLow();\n\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\n error CircularLinkage();\n\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\n error CrossTreeLinkage();\n\n /// @notice Emitted when attempting to link a tophat without a request\n error LinkageNotRequested();\n\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\n /// @dev This ensures that unlinking never results in a bricked tophat\n error InvalidUnlink();\n\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\n error ZeroAddress();\n\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\n error StringTooLong();\n}\n" + }, + "contracts/interfaces/hats/HatsEvents.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsEvents {\n /// @notice Emitted when a new hat is created\n /// @param id The id for the new hat\n /// @param details A description of the Hat\n /// @param maxSupply The total instances of the Hat that can be worn at once\n /// @param eligibility The address that can report on the Hat wearer's status\n /// @param toggle The address that can deactivate the Hat\n /// @param mutable_ Whether the hat's properties are changeable after creation\n /// @param imageURI The image uri for this hat and the fallback for its\n event HatCreated(\n uint256 id,\n string details,\n uint32 maxSupply,\n address eligibility,\n address toggle,\n bool mutable_,\n string imageURI\n );\n\n /// @notice Emitted when a hat wearer's standing is updated\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\n /// @param hatId The id of the wearer's hat\n /// @param wearer The wearer's address\n /// @param wearerStanding Whether the wearer is in good standing for the hat\n event WearerStandingChanged(\n uint256 hatId,\n address wearer,\n bool wearerStanding\n );\n\n /// @notice Emitted when a hat's status is updated\n /// @param hatId The id of the hat\n /// @param newStatus Whether the hat is active\n event HatStatusChanged(uint256 hatId, bool newStatus);\n\n /// @notice Emitted when a hat's details are updated\n /// @param hatId The id of the hat\n /// @param newDetails The updated details\n event HatDetailsChanged(uint256 hatId, string newDetails);\n\n /// @notice Emitted when a hat's eligibility module is updated\n /// @param hatId The id of the hat\n /// @param newEligibility The updated eligibiliy module\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\n\n /// @notice Emitted when a hat's toggle module is updated\n /// @param hatId The id of the hat\n /// @param newToggle The updated toggle module\n event HatToggleChanged(uint256 hatId, address newToggle);\n\n /// @notice Emitted when a hat's mutability is updated\n /// @param hatId The id of the hat\n event HatMutabilityChanged(uint256 hatId);\n\n /// @notice Emitted when a hat's maximum supply is updated\n /// @param hatId The id of the hat\n /// @param newMaxSupply The updated max supply\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\n\n /// @notice Emitted when a hat's image URI is updated\n /// @param hatId The id of the hat\n /// @param newImageURI The updated image URI\n event HatImageURIChanged(uint256 hatId, string newImageURI);\n\n /// @notice Emitted when a tophat linkage is requested by its admin\n /// @param domain The domain of the tree tophat to link\n /// @param newAdmin The tophat's would-be admin in the parent tree\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\n\n /// @notice Emitted when a tophat is linked to a another tree\n /// @param domain The domain of the newly-linked tophat\n /// @param newAdmin The tophat's new admin in the parent tree\n event TopHatLinked(uint32 domain, uint256 newAdmin);\n}\n" + }, + "contracts/interfaces/hats/IHats.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\nimport \"./IHatsIdUtilities.sol\";\nimport \"./HatsErrors.sol\";\nimport \"./HatsEvents.sol\";\n\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\n function mintTopHat(\n address _target,\n string memory _details,\n string memory _imageURI\n ) external returns (uint256 topHatId);\n\n function createHat(\n uint256 _admin,\n string calldata _details,\n uint32 _maxSupply,\n address _eligibility,\n address _toggle,\n bool _mutable,\n string calldata _imageURI\n ) external returns (uint256 newHatId);\n\n function batchCreateHats(\n uint256[] calldata _admins,\n string[] calldata _details,\n uint32[] calldata _maxSupplies,\n address[] memory _eligibilityModules,\n address[] memory _toggleModules,\n bool[] calldata _mutables,\n string[] calldata _imageURIs\n ) external returns (bool success);\n\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\n\n function mintHat(\n uint256 _hatId,\n address _wearer\n ) external returns (bool success);\n\n function batchMintHats(\n uint256[] calldata _hatIds,\n address[] calldata _wearers\n ) external returns (bool success);\n\n function setHatStatus(\n uint256 _hatId,\n bool _newStatus\n ) external returns (bool toggled);\n\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\n\n function setHatWearerStatus(\n uint256 _hatId,\n address _wearer,\n bool _eligible,\n bool _standing\n ) external returns (bool updated);\n\n function checkHatWearerStatus(\n uint256 _hatId,\n address _wearer\n ) external returns (bool updated);\n\n function renounceHat(uint256 _hatId) external;\n\n function transferHat(uint256 _hatId, address _from, address _to) external;\n\n /*//////////////////////////////////////////////////////////////\n HATS ADMIN FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function makeHatImmutable(uint256 _hatId) external;\n\n function changeHatDetails(\n uint256 _hatId,\n string memory _newDetails\n ) external;\n\n function changeHatEligibility(\n uint256 _hatId,\n address _newEligibility\n ) external;\n\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\n\n function changeHatImageURI(\n uint256 _hatId,\n string memory _newImageURI\n ) external;\n\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\n\n function requestLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat\n ) external;\n\n function approveLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\n\n function relinkTopHatWithinTree(\n uint32 _topHatDomain,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n /*//////////////////////////////////////////////////////////////\n VIEW FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function viewHat(\n uint256 _hatId\n )\n external\n view\n returns (\n string memory details,\n uint32 maxSupply,\n uint32 supply,\n address eligibility,\n address toggle,\n string memory imageURI,\n uint16 lastHatId,\n bool mutable_,\n bool active\n );\n\n function isWearerOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isWearer);\n\n function isAdminOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isAdmin);\n\n function isInGoodStanding(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool standing);\n\n function isEligible(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool eligible);\n\n function getHatEligibilityModule(\n uint256 _hatId\n ) external view returns (address eligibility);\n\n function getHatToggleModule(\n uint256 _hatId\n ) external view returns (address toggle);\n\n function getHatMaxSupply(\n uint256 _hatId\n ) external view returns (uint32 maxSupply);\n\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\n\n function getImageURIForHat(\n uint256 _hatId\n ) external view returns (string memory _uri);\n\n function balanceOf(\n address wearer,\n uint256 hatId\n ) external view returns (uint256 balance);\n\n function balanceOfBatch(\n address[] calldata _wearers,\n uint256[] calldata _hatIds\n ) external view returns (uint256[] memory);\n\n function uri(uint256 id) external view returns (string memory _uri);\n}\n" + }, + "contracts/interfaces/hats/IHatsIdUtilities.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface IHatsIdUtilities {\n function buildHatId(\n uint256 _admin,\n uint16 _newHat\n ) external pure returns (uint256 id);\n\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\n\n function getLocalHatLevel(\n uint256 _hatId\n ) external pure returns (uint32 level);\n\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\n\n function isLocalTopHat(\n uint256 _hatId\n ) external pure returns (bool _localTopHat);\n\n function isValidHatId(\n uint256 _hatId\n ) external view returns (bool validHatId);\n\n function getAdminAtLevel(\n uint256 _hatId,\n uint32 _level\n ) external view returns (uint256 admin);\n\n function getAdminAtLocalLevel(\n uint256 _hatId,\n uint32 _level\n ) external pure returns (uint256 admin);\n\n function getTopHatDomain(\n uint256 _hatId\n ) external view returns (uint32 domain);\n\n function getTippyTopHatDomain(\n uint32 _topHatDomain\n ) external view returns (uint32 domain);\n\n function noCircularLinkage(\n uint32 _topHatDomain,\n uint256 _linkedAdmin\n ) external view returns (bool notCircular);\n\n function sameTippyTopHatDomain(\n uint32 _topHatDomain,\n uint256 _newAdminHat\n ) external view returns (bool sameDomain);\n}\n" + }, + "contracts/mocks/MockHatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport \"../azorius/strategies/HatsProposalCreationWhitelist.sol\";\n\ncontract MockHatsProposalCreationWhitelist is HatsProposalCreationWhitelist {\n function setUp(bytes memory initializeParams) public override initializer {\n __Ownable_init();\n super.setUp(initializeParams);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/LinearERC20VotingWithHatsProposalCreation.json b/deployments/sepolia/LinearERC20VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..bbcb833 --- /dev/null +++ b/deployments/sepolia/LinearERC20VotingWithHatsProposalCreation.json @@ -0,0 +1,1334 @@ +{ + "address": "0x7685AB6fbA8D84b70c9cEd877735b20abdDE704F", + "abi": [ + { + "inputs": [], + "name": "AlreadyVoted", + "type": "error" + }, + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidQuorumNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "requiredProposerWeight", + "type": "uint256" + } + ], + "name": "RequiredProposerWeightUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QUORUM_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votingSupply", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_voter", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getVotingWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governanceToken", + "outputs": [ + { + "internalType": "contract IVotes", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_abstainVotes", + "type": "uint256" + } + ], + "name": "meetsQuorum", + "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": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredProposerWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requiredProposerWeight", + "type": "uint256" + } + ], + "name": "updateRequiredProposerWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xbbb8e30137d296ec27a241c827240215d3f7bfef4004e20896969e826b4241f8", + "receipt": { + "to": null, + "from": "0xfcf7a2794D066110162ADdcE3085dfd6221D4ddD", + "contractAddress": "0x7685AB6fbA8D84b70c9cEd877735b20abdDE704F", + "transactionIndex": 64, + "gasUsed": "1593488", + "logsBloom": "0x00000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x6fa3e9c546764ca0a4529b739d66860f7b5c0bf7c3bf1422f90d41217a7292d3", + "transactionHash": "0xbbb8e30137d296ec27a241c827240215d3f7bfef4004e20896969e826b4241f8", + "logs": [ + { + "transactionIndex": 64, + "blockNumber": 7024912, + "transactionHash": "0xbbb8e30137d296ec27a241c827240215d3f7bfef4004e20896969e826b4241f8", + "address": "0x7685AB6fbA8D84b70c9cEd877735b20abdDE704F", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 57, + "blockHash": "0x6fa3e9c546764ca0a4529b739d66860f7b5c0bf7c3bf1422f90d41217a7292d3" + } + ], + "blockNumber": 7024912, + "cumulativeGasUsed": "10099919", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyVoted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidQuorumNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"QuorumNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"RequiredProposerWeightUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"QUORUM_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votingSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getVotingWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceToken\",\"outputs\":[{\"internalType\":\"contract IVotes\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_abstainVotes\",\"type\":\"uint256\"}],\"name\":\"meetsQuorum\",\"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\":\"quorumNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"quorumVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredProposerWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumNumerator\",\"type\":\"uint256\"}],\"name\":\"updateQuorumNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requiredProposerWeight\",\"type\":\"uint256\"}],\"name\":\"updateRequiredProposerWeight\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getProposalVotingSupply(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"_0\":\"uint256 voting supply snapshot for the given _proposalId\"}},\"getVotingWeight(address,uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\",\"_voter\":\"address of the voter\"},\"returns\":{\"_0\":\"uint256 the address' voting weight\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address)\":{\"params\":{\"_address\":\"address to check\",\"_proposalId\":\"id of the Proposal to check\"},\"returns\":{\"_0\":\"bool true if the address has voted on the Proposal, otherwise false\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"meetsQuorum(uint256,uint256,uint256)\":{\"params\":{\"_abstainVotes\":\"number of votes abstaining\",\"_totalSupply\":\"the total supply of tokens\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the total number of yes votes + abstain meets the quorum\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"quorumVotes(uint32)\":{\"params\":{\"_proposalId\":\"The ID of the proposal to get quorum votes for\"},\"returns\":{\"_0\":\"uint256 The quantity of votes required to meet quorum\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateQuorumNumerator(uint256)\":{\"params\":{\"_quorumNumerator\":\"numerator to use when calculating quorum (over 1,000,000)\"}},\"updateRequiredProposerWeight(uint256)\":{\"params\":{\"_requiredProposerWeight\":\"required token voting weight\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8)\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"errors\":{\"InvalidQuorumNumerator()\":[{\"notice\":\"Ensures the numerator cannot be larger than the denominator. \"}]},\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"QUORUM_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating quorum (1,000,000). \"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getProposalVotingSupply(uint32)\":{\"notice\":\"Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails.\"},\"getVotingWeight(address,uint32)\":{\"notice\":\"Calculates the voting weight an address has for a specific Proposal.\"},\"hasVoted(uint32,address)\":{\"notice\":\"Returns whether an address has voted on the specified Proposal.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"meetsQuorum(uint256,uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes.\"},\"quorumNumerator()\":{\"notice\":\"The numerator to use when calculating quorum (adjustable). \"},\"quorumVotes(uint32)\":{\"notice\":\"Calculates the total number of votes required for a proposal to meet quorum. \"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"requiredProposerWeight()\":{\"notice\":\"Voting weight required to be able to submit Proposals. \"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateQuorumNumerator(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateRequiredProposerWeight(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8)\":{\"notice\":\"Casts votes for a Proposal, equal to the caller's token delegation.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":\"LinearERC20VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/azorius/BaseQuorumPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based quorums.\\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\\n */\\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating quorum (adjustable). */\\n uint256 public quorumNumerator;\\n\\n /** The denominator to use when calculating quorum (1,000,000). */\\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\\n\\n /** Ensures the numerator cannot be larger than the denominator. */\\n error InvalidQuorumNumerator();\\n\\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\\n\\n /** \\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\\n */\\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\\n _updateQuorumNumerator(_quorumNumerator);\\n }\\n\\n /** Internal implementation of `updateQuorumNumerator`. */\\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\\n if (_quorumNumerator > QUORUM_DENOMINATOR)\\n revert InvalidQuorumNumerator();\\n\\n quorumNumerator = _quorumNumerator;\\n\\n emit QuorumNumeratorUpdated(_quorumNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\\n * votes.\\n *\\n * @param _totalSupply the total supply of tokens\\n * @param _yesVotes number of votes in favor\\n * @param _abstainVotes number of votes abstaining\\n * @return bool whether the total number of yes votes + abstain meets the quorum\\n */\\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\\n }\\n\\n /**\\n * Calculates the total number of votes required for a proposal to meet quorum.\\n * \\n * @param _proposalId The ID of the proposal to get quorum votes for\\n * @return uint256 The quantity of votes required to meet quorum\\n */\\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x0218f97766d3b796f72e4ee0e1b267e72ccad8d979dfd14c5699f93d05c64c29\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC20VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IVotes} from \\\"@openzeppelin/contracts/governance/utils/IVotes.sol\\\";\\nimport {BaseStrategy, IBaseStrategy} from \\\"../BaseStrategy.sol\\\";\\nimport {BaseQuorumPercent} from \\\"../BaseQuorumPercent.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\\n *\\n * This contract is an extensible version of LinearERC20Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC20VotingExtensible is\\n BaseStrategy,\\n BaseQuorumPercent,\\n BaseVotingBasisPercent\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\\n }\\n\\n IVotes public governanceToken;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /** Voting weight required to be able to submit Proposals. */\\n uint256 public requiredProposerWeight;\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) internal proposalVotes;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n uint256 weight\\n );\\n\\n error InvalidProposal();\\n error VotingEnded();\\n error AlreadyVoted();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n IVotes _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _requiredProposerWeight,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (address, IVotes, address, uint32, uint256, uint256, uint256)\\n );\\n if (address(_governanceToken) == address(0))\\n revert InvalidTokenAddress();\\n\\n governanceToken = _governanceToken;\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumNumerator(_quorumNumerator);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _requiredProposerWeight required token voting weight\\n */\\n function updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) external virtual onlyOwner {\\n _updateRequiredProposerWeight(_requiredProposerWeight);\\n }\\n\\n /**\\n * Casts votes for a Proposal, equal to the caller's token delegation.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n */\\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\\n _vote(\\n _proposalId,\\n msg.sender,\\n _voteType,\\n getVotingWeight(msg.sender, _proposalId)\\n );\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock,\\n uint256 votingSupply\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n votingSupply = getProposalVotingSupply(_proposalId);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /**\\n * Returns whether an address has voted on the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal to check\\n * @param _address address to check\\n * @return bool true if the address has voted on the Proposal, otherwise false\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _address\\n ) public view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_address];\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n meetsQuorum(\\n getProposalVotingSupply(_proposalId),\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].abstainVotes\\n ) && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /**\\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\\n * not when it is being voted on passes / fails.\\n *\\n * @param _proposalId id of the Proposal\\n * @return uint256 voting supply snapshot for the given _proposalId\\n */\\n function getProposalVotingSupply(\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastTotalSupply(\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /**\\n * Calculates the voting weight an address has for a specific Proposal.\\n *\\n * @param _voter address of the voter\\n * @param _proposalId id of the Proposal\\n * @return uint256 the address' voting weight\\n */\\n function getVotingWeight(\\n address _voter,\\n uint32 _proposalId\\n ) public view virtual returns (uint256) {\\n return\\n governanceToken.getPastVotes(\\n _voter,\\n proposalVotes[_proposalId].votingStartBlock\\n );\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n return\\n governanceToken.getPastVotes(_address, block.number - 1) >=\\n requiredProposerWeight;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateRequiredProposerWeight`. */\\n function _updateRequiredProposerWeight(\\n uint256 _requiredProposerWeight\\n ) internal virtual {\\n requiredProposerWeight = _requiredProposerWeight;\\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _weight amount of voting weight cast, typically the\\n * total number of tokens delegated\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n uint256 _weight\\n ) internal virtual {\\n if (proposalVotes[_proposalId].votingEndBlock == 0)\\n revert InvalidProposal();\\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\\n revert VotingEnded();\\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\\n\\n proposalVotes[_proposalId].hasVoted[_voter] = true;\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposalVotes[_proposalId].noVotes += _weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposalVotes[_proposalId].yesVotes += _weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposalVotes[_proposalId].abstainVotes += _weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _weight);\\n }\\n\\n /** @inheritdoc BaseQuorumPercent*/\\n function quorumVotes(\\n uint32 _proposalId\\n ) public view virtual override returns (uint256) {\\n return\\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\\n QUORUM_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x18b46de302f756d61b4a47c65fae9b676a6352490739a643527ea5c0ccc2eea4\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {LinearERC20VotingExtensible} from \\\"./LinearERC20VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC20VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC20VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\\n * `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n {\\n (\\n address _owner,\\n address _governanceToken,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumNumerator,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address,\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC20VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _governanceToken,\\n _azoriusModule,\\n _votingPeriod,\\n 0, // requiredProposerWeight is zero because we only care about the hat check\\n _quorumNumerator,\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0xa072c25a19494d97729e7b56dafa7a7b75caa3558620784ffef077af1f2f428a\",\"license\":\"LGPL-3.0-only\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611b60806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063a7713a70116100ad578063d3c22b381161007c578063d3c22b3814610443578063deb61c1514610487578063e8575a7f146104d0578063f2fde38b146104e3578063f96dae0a146104f657600080fd5b8063a7713a701461040b578063a77a81d014610414578063bf7e2c7f14610427578063ca1dc30b1461043057600080fd5b80639bff4df4116100e95780639bff4df4146103c95780639dd783c2146103d2578063a09c4f68146103e5578063a4f9edbf146103f857600080fd5b80638da5cb5b1461037f578063918f84bf146103905780639767fb72146103a357806397e39fef146103b657600080fd5b806355a9dbd91161019257806372d75d761161016157806372d75d761461034457806374ec29a0146103595780638081be91146103325780638a2f2c8a1461036c57600080fd5b806355a9dbd9146102d657806366b62955146103075780636fef541a14610332578063715018a61461033c57600080fd5b806333f48a5e116101ce57806333f48a5e1461027a57806337938ab31461028d5780633a622c52146102a057806353a8b320146102b357600080fd5b806302a251a31461020057806306f3f9e61461023157806308453ad2146102465780631236af7c14610267575b600080fd5b606a5461021790600160a01b900463ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b61024461023f3660046114ed565b610509565b005b610259610254366004611518565b61051d565b604051908152602001610228565b610259610275366004611518565b6105a6565b610244610288366004611518565b6105cc565b61024461029b36600461154a565b6105dd565b6102446102ae3660046114ed565b61062f565b6102c66102c1366004611518565b61074c565b6040519015158152602001610228565b6102176102e4366004611518565b63ffffffff9081166000908152606c602052604090205464010000000090041690565b60675461031a906001600160a01b031681565b6040516001600160a01b039091168152602001610228565b610259620f424081565b6102446107da565b61034c6107ee565b60405161022891906115a2565b6102c661036736600461154a565b610846565b61024461037a3660046114ed565b610851565b6033546001600160a01b031661031a565b6102c661039e3660046115b5565b610862565b6102446103b13660046115d7565b610894565b60655461031a906001600160a01b031681565b610259606b5481565b6102c66103e0366004611616565b6108ad565b6102446103f33660046114ed565b6108df565b610244610406366004611689565b6108f0565b61025960685481565b610244610422366004611689565b6109bc565b61025960695481565b61025961043e36600461171e565b610aa3565b6102c661045136600461174c565b63ffffffff82166000908152606c602090815260408083206001600160a01b038516845260040190915290205460ff1692915050565b61049a610495366004611518565b610b38565b6040805196875260208701959095529385019290925263ffffffff908116606085015216608083015260a082015260c001610228565b6102446104de3660046114ed565b610b87565b6102446104f136600461154a565b610b98565b606a5461031a906001600160a01b031681565b610511610c13565b61051a81610c6d565b50565b606a5463ffffffff8281166000908152606c6020526040808220549051632394e7a360e21b815292166004830152916001600160a01b031690638e539e8c90602401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061177a565b92915050565b6000620f42406105b58361051d565b6068546105c291906117a9565b6105a091906117c0565b6105d4610c13565b61051a81610ccd565b6105e5610c13565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610637610c13565b6000805b6066548110156106f5578260668281548110610659576106596117e2565b9060005260206000200154036106e35760668054610679906001906117f8565b81548110610689576106896117e2565b9060005260206000200154606682815481106106a7576106a76117e2565b60009182526020909120015560668054806106c4576106c461180b565b60019003818190600052602060002001600090559055600191506106f5565b806106ed81611821565b91505061063b565b508061071457604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b63ffffffff8082166000908152606c6020526040812054909164010000000090910416431180156107a957506107a96107848361051d565b63ffffffff84166000908152606c6020526040902060028101546003909101546108ad565b80156105a0575063ffffffff82166000908152606c6020526040902060028101546001909101546105a09190610862565b6107e2610c13565b6107ec6000610d21565b565b6060606680548060200260200160405190810160405280929190818152602001828054801561083c57602002820191906000526020600020905b815481526020019060010190808311610828575b5050505050905090565b60006105a082610d73565b610859610c13565b61051a81610e4e565b6000620f42406069548385610877919061183a565b61088191906117a9565b61088b91906117c0565b90921192915050565b6108a98233836108a43387610aa3565b610e83565b5050565b6000620f4240606854856108c191906117a9565b6108cb91906117c0565b6108d5838561183a565b1015949350505050565b6108e7610c13565b61051a816110a2565b6000806000806000806000808880602001905181019061091091906118cd565b604080516001600160a01b03808b166020830152808a1692820192909252908716606082015263ffffffff86166080820152600060a082015260c0810185905260e08101849052979f50959d50939b5091995097509550935091506109879061010001604051602081830303815290604052611164565b6109b1828260405160200161099d929190611981565b60405160208183030381529060405261135d565b505050505050505050565b6067546001600160a01b031633146109e7576040516358c30ce160e01b815260040160405180910390fd5b6000818060200190518101906109fd91906119ad565b606a54909150600090610a1d90600160a01b900463ffffffff16436119ca565b63ffffffff8381166000818152606c6020908152604091829020805467ffffffffffffffff191664010000000087871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b606a5463ffffffff8281166000908152606c6020526040808220549051630748d63560e31b81526001600160a01b03878116600483015291909316602484015290921690633a46b1a890604401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b31919061177a565b9392505050565b63ffffffff8082166000908152606c6020526040812060018101546002820154600383015492549194909382821692640100000000900490911690610b7c8761051d565b905091939550919395565b610b8f610c13565b61051a81611423565b610ba0610c13565b6001600160a01b038116610c0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61051a81610d21565b6033546001600160a01b031633146107ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c01565b620f4240811115610c9157604051630d2a3fcb60e41b815260040160405180910390fd5b60688190556040518181527f0cc18e3862a55e514917eb8f248561dd65e0fbbba65f5468f203e92193635dd3906020015b60405180910390a150565b606a805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610cc2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b606654811015610e4557606554606680546001600160a01b0390921691634352409a91869185908110610dac57610dac6117e2565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2591906119ee565b15610e335750600192915050565b80610e3d81611821565b915050610d77565b50600092915050565b606b8190556040518181527f93deb5027728f04c9fd8d7bcea2efb36cc7a6a7876236649f2952de0aa89a01190602001610cc2565b63ffffffff8085166000908152606c602052604081205464010000000090049091169003610ec457604051631dc0650160e31b815260040160405180910390fd5b63ffffffff8085166000908152606c6020526040902054640100000000900416431115610f0457604051637a19ed0560e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b038716845260040190915290205460ff1615610f5257604051637c9a1cf960e01b815260040160405180910390fd5b63ffffffff84166000908152606c602090815260408083206001600160a01b03871684526004019091529020805460ff1916600117905560ff8216610fc45763ffffffff84166000908152606c602052604081206001018054839290610fb990849061183a565b909155506110459050565b60001960ff831601610ff85763ffffffff84166000908152606c602052604081206002018054839290610fb990849061183a565b60011960ff83160161102c5763ffffffff84166000908152606c602052604081206003018054839290610fb990849061183a565b604051636aee863360e11b815260040160405180910390fd5b604080516001600160a01b038516815263ffffffff8616602082015260ff8416818301526060810183905290517fe82b577bd384111662dd034b9114cbe59b26ea201f009d385006518ed28bed819181900360800190a150505050565b60005b6066548110156110fe5781606682815481106110c3576110c36117e2565b9060005260206000200154036110ec5760405163634a456360e01b815260040160405180910390fd5b806110f681611821565b9150506110a5565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610cc2565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c01565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b6000806000806000806000888060200190518101906112439190611a10565b959c50939a5091985096509450925090506001600160a01b03861661127b57604051630f58058360e11b815260040160405180910390fd5b606a80546001600160a01b0319166001600160a01b03881617905561129e611493565b6112a787610b98565b6112b0856105e5565b6112b982610c6d565b6112c281611423565b6112cb84610ccd565b6112d483610e4e565b866001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a35050505050505080156108a9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610740565b600080828060200190518101906113749190611a8e565b90925090506001600160a01b0382166113a0576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b03841617905580516000036113dd57604051632a2b50e760e01b815260040160405180910390fd5b60005b815181101561141d5761140b8282815181106113fe576113fe6117e2565b60200260200101516110a2565b8061141581611821565b9150506113e0565b50505050565b620f4240811180611440575061143d6002620f42406117c0565b81105b1561145e576040516302396b6b60e61b815260040160405180910390fd5b60698190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610cc2565b600054610100900460ff166114ba5760405162461bcd60e51b8152600401610c0190611adf565b6107ec600054610100900460ff166114e45760405162461bcd60e51b8152600401610c0190611adf565b6107ec33610d21565b6000602082840312156114ff57600080fd5b5035919050565b63ffffffff8116811461051a57600080fd5b60006020828403121561152a57600080fd5b8135610b3181611506565b6001600160a01b038116811461051a57600080fd5b60006020828403121561155c57600080fd5b8135610b3181611535565b600081518084526020808501945080840160005b838110156115975781518752958201959082019060010161157b565b509495945050505050565b602081526000610b316020830184611567565b600080604083850312156115c857600080fd5b50508035926020909101359150565b600080604083850312156115ea57600080fd5b82356115f581611506565b9150602083013560ff8116811461160b57600080fd5b809150509250929050565b60008060006060848603121561162b57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561168157611681611642565b604052919050565b6000602080838503121561169c57600080fd5b823567ffffffffffffffff808211156116b457600080fd5b818501915085601f8301126116c857600080fd5b8135818111156116da576116da611642565b6116ec601f8201601f19168501611658565b9150808252868482850101111561170257600080fd5b8084840185840137600090820190930192909252509392505050565b6000806040838503121561173157600080fd5b823561173c81611535565b9150602083013561160b81611506565b6000806040838503121561175f57600080fd5b823561176a81611506565b9150602083013561160b81611535565b60006020828403121561178c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a0576105a0611793565b6000826117dd57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156105a0576105a0611793565b634e487b7160e01b600052603160045260246000fd5b60006001820161183357611833611793565b5060010190565b808201808211156105a0576105a0611793565b600082601f83011261185e57600080fd5b8151602067ffffffffffffffff82111561187a5761187a611642565b8160051b611889828201611658565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578251825291830191908301906118a9565b979650505050505050565b600080600080600080600080610100898b0312156118ea57600080fd5b88516118f581611535565b60208a015190985061190681611535565b60408a015190975061191781611535565b60608a015190965061192881611506565b809550506080890151935060a0890151925060c089015161194881611535565b60e08a015190925067ffffffffffffffff81111561196557600080fd5b6119718b828c0161184d565b9150509295985092959890939650565b6001600160a01b03831681526040602082018190526000906119a590830184611567565b949350505050565b6000602082840312156119bf57600080fd5b8151610b3181611506565b63ffffffff8181168382160190808211156119e7576119e7611793565b5092915050565b600060208284031215611a0057600080fd5b81518015158114610b3157600080fd5b600080600080600080600060e0888a031215611a2b57600080fd5b8751611a3681611535565b6020890151909750611a4781611535565b6040890151909650611a5881611535565b6060890151909550611a6981611506565b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60008060408385031215611aa157600080fd5b8251611aac81611535565b602084015190925067ffffffffffffffff811115611ac957600080fd5b611ad58582860161184d565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212207f4000393bf415c2ccc8f34db1f0107add0e77cb21719caa9e1a51dab06160d064736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getProposalVotingSupply(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "_0": "uint256 voting supply snapshot for the given _proposalId" + } + }, + "getVotingWeight(address,uint32)": { + "params": { + "_proposalId": "id of the Proposal", + "_voter": "address of the voter" + }, + "returns": { + "_0": "uint256 the address' voting weight" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address)": { + "params": { + "_address": "address to check", + "_proposalId": "id of the Proposal to check" + }, + "returns": { + "_0": "bool true if the address has voted on the Proposal, otherwise false" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "meetsQuorum(uint256,uint256,uint256)": { + "params": { + "_abstainVotes": "number of votes abstaining", + "_totalSupply": "the total supply of tokens", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the total number of yes votes + abstain meets the quorum" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "quorumVotes(uint32)": { + "params": { + "_proposalId": "The ID of the proposal to get quorum votes for" + }, + "returns": { + "_0": "uint256 The quantity of votes required to meet quorum" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateQuorumNumerator(uint256)": { + "params": { + "_quorumNumerator": "numerator to use when calculating quorum (over 1,000,000)" + } + }, + "updateRequiredProposerWeight(uint256)": { + "params": { + "_requiredProposerWeight": "required token voting weight" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8)": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "errors": { + "InvalidQuorumNumerator()": [ + { + "notice": "Ensures the numerator cannot be larger than the denominator. " + } + ] + }, + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "QUORUM_DENOMINATOR()": { + "notice": "The denominator to use when calculating quorum (1,000,000). " + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getProposalVotingSupply(uint32)": { + "notice": "Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change, it is necessary to calculate quorum from the supply available at the time of the Proposal's creation, not when it is being voted on passes / fails." + }, + "getVotingWeight(address,uint32)": { + "notice": "Calculates the voting weight an address has for a specific Proposal." + }, + "hasVoted(uint32,address)": { + "notice": "Returns whether an address has voted on the specified Proposal." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "meetsQuorum(uint256,uint256,uint256)": { + "notice": "Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain votes." + }, + "quorumNumerator()": { + "notice": "The numerator to use when calculating quorum (adjustable). " + }, + "quorumVotes(uint32)": { + "notice": "Calculates the total number of votes required for a proposal to meet quorum. " + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "requiredProposerWeight()": { + "notice": "Voting weight required to be able to submit Proposals. " + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateQuorumNumerator(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateRequiredProposerWeight(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8)": { + "notice": "Casts votes for a Proposal, equal to the caller's token delegation." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 801, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "quorumNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "105", + "type": "t_uint256" + }, + { + "astId": 1629, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "governanceToken", + "offset": 0, + "slot": "106", + "type": "t_contract(IVotes)663" + }, + { + "astId": 1632, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 20, + "slot": "106", + "type": "t_uint32" + }, + { + "astId": 1635, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "requiredProposerWeight", + "offset": 0, + "slot": "107", + "type": "t_uint256" + }, + { + "astId": 1641, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "108", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)" + } + ], + "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_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "t_contract(IVotes)663": { + "encoding": "inplace", + "label": "contract IVotes", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_struct(ProposalVotes)1626_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC20VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)1626_storage" + }, + "t_struct(ProposalVotes)1626_storage": { + "encoding": "inplace", + "label": "struct LinearERC20VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 1613, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1615, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 1617, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 1619, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 1621, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 1625, + "contract": "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol:LinearERC20VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_bool)" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/LinearERC721VotingWithHatsProposalCreation.json b/deployments/sepolia/LinearERC721VotingWithHatsProposalCreation.json new file mode 100644 index 0000000..499a8bb --- /dev/null +++ b/deployments/sepolia/LinearERC721VotingWithHatsProposalCreation.json @@ -0,0 +1,1440 @@ +{ + "address": "0xC8aEE19010415B978A2Af606E9E4cDC8FD4D77b3", + "abi": [ + { + "inputs": [], + "name": "HatAlreadyWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "HatNotWhitelisted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdAlreadyVoted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "IdNotOwned", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBasisNumerator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHatsContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParams", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTokenAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NoHatsWhitelisted", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotingWeight", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAzorius", + "type": "error" + }, + { + "inputs": [], + "name": "TokenAlreadySet", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "VotingEnded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + } + ], + "name": "AzoriusSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "basisNumerator", + "type": "uint256" + } + ], + "name": "BasisNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "GovernanceTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "GovernanceTokenRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatRemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + } + ], + "name": "HatWhitelisted", + "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": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + } + ], + "name": "ProposalInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposerThreshold", + "type": "uint256" + } + ], + "name": "ProposerThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "quorumThreshold", + "type": "uint256" + } + ], + "name": "QuorumThresholdUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "azoriusModule", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "StrategySetUp", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "tokenAddresses", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "Voted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + } + ], + "name": "VotingPeriodUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_weight", + "type": "uint256" + } + ], + "name": "addGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "azoriusModule", + "outputs": [ + { + "internalType": "contract IAzorius", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "basisNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllTokenAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "getProposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "startBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "endBlock", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "getTokenWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelistedHatIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hatsContract", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initializeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "isPassed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_noVotes", + "type": "uint256" + } + ], + "name": "meetsBasis", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint32", + "name": "votingStartBlock", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingEndBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposerThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "removeGovernanceToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "removeHatFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_azoriusModule", + "type": "address" + } + ], + "name": "setAzorius", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializeParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokenAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenWeights", + "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": "_basisNumerator", + "type": "uint256" + } + ], + "name": "updateBasisNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_proposerThreshold", + "type": "uint256" + } + ], + "name": "updateProposerThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_quorumThreshold", + "type": "uint256" + } + ], + "name": "updateQuorumThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_votingPeriod", + "type": "uint32" + } + ], + "name": "updateVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "_voteType", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "_tokenAddresses", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "votingEndBlock", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hatId", + "type": "uint256" + } + ], + "name": "whitelistHat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe49146299820cd510f670491a078c44657142a46b12d2909537b6721dced6c78", + "receipt": { + "to": null, + "from": "0xfcf7a2794D066110162ADdcE3085dfd6221D4ddD", + "contractAddress": "0xC8aEE19010415B978A2Af606E9E4cDC8FD4D77b3", + "transactionIndex": 77, + "gasUsed": "1961378", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000", + "blockHash": "0x5ae0e30cbfb548a030e869d4fdd181b5d6c5104e3e7f54ede53007dd6951ebf3", + "transactionHash": "0xe49146299820cd510f670491a078c44657142a46b12d2909537b6721dced6c78", + "logs": [ + { + "transactionIndex": 77, + "blockNumber": 7024913, + "transactionHash": "0xe49146299820cd510f670491a078c44657142a46b12d2909537b6721dced6c78", + "address": "0xC8aEE19010415B978A2Af606E9E4cDC8FD4D77b3", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 101, + "blockHash": "0x5ae0e30cbfb548a030e869d4fdd181b5d6c5104e3e7f54ede53007dd6951ebf3" + } + ], + "blockNumber": 7024913, + "cumulativeGasUsed": "7590259", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "af493beb8ac3dcaf17411aefc1e2bf83", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"HatAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HatNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"IdNotOwned\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasisNumerator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidHatsContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProposal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHatsWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoVotingWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAzorius\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotingEnded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"}],\"name\":\"AzoriusSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"basisNumerator\",\"type\":\"uint256\"}],\"name\":\"BasisNumeratorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"GovernanceTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"GovernanceTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"}],\"name\":\"HatWhitelisted\",\"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\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"}],\"name\":\"ProposalInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"ProposerThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"QuorumThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"azoriusModule\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"StrategySetUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokenAddresses\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASIS_DENOMINATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_weight\",\"type\":\"uint256\"}],\"name\":\"addGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"azoriusModule\",\"outputs\":[{\"internalType\":\"contract IAzorius\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"basisNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllTokenAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"getProposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"startBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"endBlock\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelistedHatIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"hasVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hatsContract\",\"outputs\":[{\"internalType\":\"contract IHats\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"initializeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"isPassed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isProposer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_noVotes\",\"type\":\"uint256\"}],\"name\":\"meetsBasis\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalVotes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"votingStartBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingEndBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposerThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorumThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"removeGovernanceToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"removeHatFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_azoriusModule\",\"type\":\"address\"}],\"name\":\"setAzorius\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializeParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenWeights\",\"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\":\"_basisNumerator\",\"type\":\"uint256\"}],\"name\":\"updateBasisNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposerThreshold\",\"type\":\"uint256\"}],\"name\":\"updateProposerThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumThreshold\",\"type\":\"uint256\"}],\"name\":\"updateQuorumThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_votingPeriod\",\"type\":\"uint32\"}],\"name\":\"updateVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_voteType\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"_tokenAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"votingEndBlock\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_hatId\",\"type\":\"uint256\"}],\"name\":\"whitelistHat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"addGovernanceToken(address,uint256)\":{\"params\":{\"_tokenAddress\":\"the address of the ERC-721 token\",\"_weight\":\"the number of votes each NFT id is worth\"}},\"getProposalVotes(uint32)\":{\"params\":{\"_proposalId\":\"id of the Proposal\"},\"returns\":{\"abstainVotes\":\"current count of \\\"ABSTAIN\\\" votes\",\"endBlock\":\"block number voting ends\",\"noVotes\":\"current count of \\\"NO\\\" votes\",\"startBlock\":\"block number voting starts\",\"yesVotes\":\"current count of \\\"YES\\\" votes\"}},\"getTokenWeight(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token address\"}},\"getWhitelistedHatIds()\":{\"details\":\"Returns the IDs of all whitelisted Hats.\",\"returns\":{\"_0\":\"uint256[] memory An array of whitelisted Hat IDs.\"}},\"hasVoted(uint32,address,uint256)\":{\"params\":{\"_proposalId\":\"the id of the Proposal\",\"_tokenAddress\":\"the ERC-721 contract address\",\"_tokenId\":\"the unique id of the NFT\"}},\"initializeProposal(bytes)\":{\"params\":{\"_data\":\"arbitrary data to pass to this BaseStrategy\"}},\"isPassed(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"bool true if the proposal has passed, otherwise false\"}},\"isProposer(address)\":{\"details\":\"Checks if an address is authorized to create proposals.\",\"params\":{\"_address\":\"The address to check for proposal creation authorization.\"},\"returns\":{\"_0\":\"bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\"}},\"meetsBasis(uint256,uint256)\":{\"params\":{\"_noVotes\":\"number of votes against\",\"_yesVotes\":\"number of votes in favor\"},\"returns\":{\"_0\":\"bool whether the yes votes meets the set basis\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeGovernanceToken(address)\":{\"params\":{\"_tokenAddress\":\"the ERC-721 token to remove\"}},\"removeHatFromWhitelist(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to remove from the whitelist\"}},\"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.\"},\"setAzorius(address)\":{\"params\":{\"_azoriusModule\":\"address of the Azorius Safe module\"}},\"setUp(bytes)\":{\"params\":{\"initializeParams\":\"encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateBasisNumerator(uint256)\":{\"params\":{\"_basisNumerator\":\"numerator to use\"}},\"updateProposerThreshold(uint256)\":{\"params\":{\"_proposerThreshold\":\"required voting weight\"}},\"updateQuorumThreshold(uint256)\":{\"params\":{\"_quorumThreshold\":\"total voting weight required to achieve quorum\"}},\"updateVotingPeriod(uint32)\":{\"params\":{\"_votingPeriod\":\"voting time period (in blocks)\"}},\"vote(uint32,uint8,address[],uint256[])\":{\"params\":{\"_proposalId\":\"id of the Proposal to vote on\",\"_tokenAddresses\":\"list of ERC-721 addresses that correspond to ids in _tokenIds\",\"_tokenIds\":\"list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\",\"_voteType\":\"Proposal support as defined in VoteType (NO, YES, ABSTAIN)\"}},\"votingEndBlock(uint32)\":{\"params\":{\"_proposalId\":\"proposalId to check\"},\"returns\":{\"_0\":\"uint32 block number when voting ends on the Proposal\"}},\"whitelistHat(uint256)\":{\"params\":{\"_hatId\":\"The ID of the Hat to whitelist\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"BASIS_DENOMINATOR()\":{\"notice\":\"The denominator to use when calculating basis (1,000,000). \"},\"addGovernanceToken(address,uint256)\":{\"notice\":\"Adds a new ERC-721 token as a governance token, along with its associated weight.\"},\"basisNumerator()\":{\"notice\":\"The numerator to use when calculating basis (adjustable). \"},\"getAllTokenAddresses()\":{\"notice\":\"Returns whole list of governance tokens addresses\"},\"getProposalVotes(uint32)\":{\"notice\":\"Returns the current state of the specified Proposal.\"},\"getTokenWeight(address)\":{\"notice\":\"Returns the current token weight for the given ERC-721 token address.\"},\"hasVoted(uint32,address,uint256)\":{\"notice\":\"Returns whether an NFT id has already voted.\"},\"initializeProposal(bytes)\":{\"notice\":\"Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\"},\"isPassed(uint32)\":{\"notice\":\"Returns whether a Proposal has been passed.\"},\"isProposer(address)\":{\"notice\":\"This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol.\"},\"meetsBasis(uint256,uint256)\":{\"notice\":\"Calculates whether a vote meets its basis.\"},\"proposalVotes(uint256)\":{\"notice\":\"`proposalId` to `ProposalVotes`, the voting state of a Proposal. \"},\"proposerThreshold()\":{\"notice\":\"The minimum number of voting power required to create a new proposal.\"},\"quorumThreshold()\":{\"notice\":\"The total number of votes required to achieve quorum. \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this.\"},\"removeGovernanceToken(address)\":{\"notice\":\"Removes the given ERC-721 token address from the list of governance tokens.\"},\"removeHatFromWhitelist(uint256)\":{\"notice\":\"Removes a Hat from the whitelist for proposal creation.\"},\"setAzorius(address)\":{\"notice\":\"Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on.\"},\"setUp(bytes)\":{\"notice\":\"Sets up the contract with its initial parameters.\"},\"tokenAddresses(uint256)\":{\"notice\":\"The list of ERC-721 tokens that can vote. \"},\"tokenWeights(address)\":{\"notice\":\"ERC-721 address to its voting weight per NFT id. \"},\"updateBasisNumerator(uint256)\":{\"notice\":\"Updates the `basisNumerator` for future Proposals.\"},\"updateProposerThreshold(uint256)\":{\"notice\":\"Updates the voting weight required to submit new Proposals.\"},\"updateQuorumThreshold(uint256)\":{\"notice\":\"Updates the quorum required for future Proposals.\"},\"updateVotingPeriod(uint32)\":{\"notice\":\"Updates the voting time period for new Proposals.\"},\"vote(uint32,uint8,address[],uint256[])\":{\"notice\":\"Submits a vote on an existing Proposal.\"},\"votingEndBlock(uint32)\":{\"notice\":\"Returns the block number voting ends on a given Proposal.\"},\"votingPeriod()\":{\"notice\":\"Number of blocks a new Proposal can be voted on. \"},\"whitelistHat(uint256)\":{\"notice\":\"Adds a Hat to the whitelist for proposal creation.\"}},\"notice\":\"An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":\"LinearERC721VotingWithHatsProposalCreation\"},\"evmVersion\":\"paris\",\"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/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"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/azorius/BaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { IAzorius } from \\\"./interfaces/IAzorius.sol\\\";\\nimport { IBaseStrategy } from \\\"./interfaces/IBaseStrategy.sol\\\";\\nimport { FactoryFriendly } from \\\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\\\";\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * The base abstract contract for all voting strategies in Azorius.\\n */\\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\\n\\n event AzoriusSet(address indexed azoriusModule);\\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\\n\\n error OnlyAzorius();\\n\\n IAzorius public azoriusModule;\\n\\n /**\\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \\n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\\n */\\n modifier onlyAzorius() {\\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function setAzorius(address _azoriusModule) external onlyOwner {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n\\n /** @inheritdoc IBaseStrategy*/\\n function initializeProposal(bytes memory _data) external virtual;\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function isProposer(address _address) external view virtual returns (bool);\\n\\n /** @inheritdoc IBaseStrategy*/\\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\\n\\n /**\\n * Sets the address of the [Azorius](Azorius.md) module contract.\\n *\\n * @param _azoriusModule address of the Azorius module\\n */\\n function _setAzorius(address _azoriusModule) internal {\\n azoriusModule = IAzorius(_azoriusModule);\\n emit AzoriusSet(_azoriusModule);\\n }\\n}\\n\",\"keccak256\":\"0xd04aeec28b5a7c7bad44f2c9dfe7641240e319b8d76d05f940453a258411c567\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/BaseVotingBasisPercent.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport { OwnableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/**\\n * An Azorius extension contract that enables percent based voting basis calculations.\\n *\\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\\n *\\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\\n * See https://en.wikipedia.org/wiki/Supermajority.\\n */\\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\\n \\n /** The numerator to use when calculating basis (adjustable). */\\n uint256 public basisNumerator;\\n\\n /** The denominator to use when calculating basis (1,000,000). */\\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\\n\\n error InvalidBasisNumerator();\\n\\n event BasisNumeratorUpdated(uint256 basisNumerator);\\n\\n /**\\n * Updates the `basisNumerator` for future Proposals.\\n *\\n * @param _basisNumerator numerator to use\\n */\\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\\n _updateBasisNumerator(_basisNumerator);\\n }\\n\\n /** Internal implementation of `updateBasisNumerator`. */\\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\\n revert InvalidBasisNumerator();\\n\\n basisNumerator = _basisNumerator;\\n\\n emit BasisNumeratorUpdated(_basisNumerator);\\n }\\n\\n /**\\n * Calculates whether a vote meets its basis.\\n *\\n * @param _yesVotes number of votes in favor\\n * @param _noVotes number of votes against\\n * @return bool whether the yes votes meets the set basis\\n */\\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\\n }\\n}\\n\",\"keccak256\":\"0x568d4c7f3e5de10272ec675cd745a53b414ca2e3388bfeff19d8addf9e324c7e\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IAzorius.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport { Enum } from \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\n/**\\n * The base interface for the Azorius governance Safe module.\\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\\n *\\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\\n *\\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\\n * as customizable as possible.\\n *\\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\\n *\\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\\n * for the duration of its voting period.\\n *\\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\\n * it cannot yet be executed. This is to allow time for token holders\\n * to potentially exit their position, as well as parent DAOs time to\\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\\n * for the duration of its `timelockPeriod`.\\n *\\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\\n * and can then finally be executed on chain by anyone.\\n *\\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\\n * on the blockchain.\\n *\\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\\n * elapsed will be `EXPIRED`, and can no longer be executed.\\n *\\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \\n * `isPassed` function). For a basic strategy, this would mean it received more \\n * NO votes than YES or did not achieve quorum. \\n */\\ninterface IAzorius {\\n\\n /** Represents a transaction to perform on the blockchain. */\\n struct Transaction {\\n address to; // destination address of the transaction\\n uint256 value; // amount of ETH to transfer with the transaction\\n bytes data; // encoded function call data of the transaction\\n Enum.Operation operation; // Operation type, Call or DelegateCall\\n }\\n\\n /** Holds details pertaining to a single proposal. */\\n struct Proposal {\\n uint32 executionCounter; // count of transactions that have been executed within the proposal\\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\\n address strategy; // BaseStrategy contract this proposal was created on\\n bytes32[] txHashes; // hashes of the transactions that are being proposed\\n }\\n\\n /** The list of states in which a Proposal can be in at any given time. */\\n enum ProposalState {\\n ACTIVE,\\n TIMELOCKED,\\n EXECUTABLE,\\n EXECUTED,\\n EXPIRED,\\n FAILED\\n }\\n\\n /**\\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\\n *\\n * Multiple strategies can be enabled, and new Proposals will be able to be\\n * created using any of the currently enabled strategies.\\n *\\n * @param _strategy contract address of the BaseStrategy to be enabled\\n */\\n function enableStrategy(address _strategy) external;\\n\\n /**\\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\\n * @param _strategy address of the BaseStrategy to be removed\\n */\\n function disableStrategy(address _prevStrategy, address _strategy) external;\\n\\n /**\\n * Updates the `timelockPeriod` for newly created Proposals.\\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\\n *\\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\\n */\\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\\n\\n /**\\n * Updates the execution period for future Proposals.\\n *\\n * @param _executionPeriod new execution period (in blocks)\\n */\\n function updateExecutionPeriod(uint32 _executionPeriod) external;\\n\\n /**\\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\\n * New Proposals begin immediately in the `ACTIVE` state.\\n *\\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \\n * but is included in case future strategy contracts have a need for it\\n * @param _transactions array of transactions to propose\\n * @param _metadata additional data such as a title/description to submit with the proposal\\n */\\n function submitProposal(\\n address _strategy,\\n bytes memory _data,\\n Transaction[] calldata _transactions,\\n string calldata _metadata\\n ) external;\\n\\n /**\\n * Executes all transactions within a Proposal.\\n * This will only be able to be called if the Proposal passed.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _targets target contracts for each transaction\\n * @param _values ETH values to be sent with each transaction\\n * @param _data transaction data to be executed\\n * @param _operations Calls or Delegatecalls\\n */\\n function executeProposal(\\n uint32 _proposalId,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _data,\\n Enum.Operation[] memory _operations\\n ) external;\\n\\n /**\\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\\n *\\n * @param _strategy contract address of the BaseStrategy to check\\n * @return bool True if the strategy is enabled, otherwise False\\n */\\n function isStrategyEnabled(address _strategy) external view returns (bool);\\n\\n /**\\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\\n * Because the list of BaseStrategies is technically unbounded, this\\n * requires the address of the first strategy you would like, along\\n * with the total count of strategies to return, rather than\\n * returning the whole list at once.\\n *\\n * @param _startAddress contract address of the BaseStrategy to start with\\n * @param _count maximum number of BaseStrategies that should be returned\\n * @return _strategies array of BaseStrategies\\n * @return _next next BaseStrategy contract address in the linked list\\n */\\n function getStrategies(\\n address _startAddress,\\n uint256 _count\\n ) external view returns (address[] memory _strategies, address _next);\\n\\n /**\\n * Gets the state of a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return ProposalState uint256 ProposalState enum value representing the\\n * current state of the proposal\\n */\\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\\n\\n /**\\n * Generates the data for the module transaction hash (required for signing).\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @param _nonce Safe nonce of the transaction\\n * @return bytes hashed transaction data\\n */\\n function generateTxHashData(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation,\\n uint256 _nonce\\n ) external view returns (bytes memory);\\n\\n /**\\n * Returns the `keccak256` hash of the specified transaction.\\n *\\n * @param _to target address of the transaction\\n * @param _value ETH value to send with the transaction\\n * @param _data encoded function call data of the transaction\\n * @param _operation Enum.Operation to use for the transaction\\n * @return bytes32 transaction hash\\n */\\n function getTxHash(\\n address _to,\\n uint256 _value,\\n bytes memory _data,\\n Enum.Operation _operation\\n ) external view returns (bytes32);\\n\\n /**\\n * Returns the hash of a transaction in a Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @param _txIndex index of the transaction within the Proposal\\n * @return bytes32 hash of the specified transaction\\n */\\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\\n\\n /**\\n * Returns the transaction hashes associated with a given `proposalId`.\\n *\\n * @param _proposalId identifier of the Proposal to get transaction hashes for\\n * @return bytes32[] array of transaction hashes\\n */\\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\\n\\n /**\\n * Returns details about the specified Proposal.\\n *\\n * @param _proposalId identifier of the Proposal\\n * @return _strategy address of the BaseStrategy contract the Proposal is on\\n * @return _txHashes hashes of the transactions the Proposal contains\\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\\n */\\n function getProposal(uint32 _proposalId) external view\\n returns (\\n address _strategy,\\n bytes32[] memory _txHashes,\\n uint32 _timelockPeriod,\\n uint32 _executionPeriod,\\n uint32 _executionCounter\\n );\\n}\\n\",\"keccak256\":\"0x1a656aacd0b0f11dec2b92d70153dc3a1b7019e9f76dd43f7c91a21fb8cfef3d\",\"license\":\"MIT\"},\"contracts/azorius/interfaces/IBaseStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\n/**\\n * The specification for a voting strategy in Azorius.\\n *\\n * Each IBaseStrategy implementation need only implement the given functions here,\\n * which allows for highly composable but simple or complex voting strategies.\\n *\\n * It should be noted that while many voting strategies make use of parameters such as\\n * voting period or quorum, that is a detail of the individual strategy itself, and not\\n * a requirement for the Azorius protocol.\\n */\\ninterface IBaseStrategy {\\n\\n /**\\n * Sets the address of the [Azorius](../Azorius.md) contract this \\n * [BaseStrategy](../BaseStrategy.md) is being used on.\\n *\\n * @param _azoriusModule address of the Azorius Safe module\\n */\\n function setAzorius(address _azoriusModule) external;\\n\\n /**\\n * Called by the [Azorius](../Azorius.md) module. This notifies this \\n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\\n *\\n * @param _data arbitrary data to pass to this BaseStrategy\\n */\\n function initializeProposal(bytes memory _data) external;\\n\\n /**\\n * Returns whether a Proposal has been passed.\\n *\\n * @param _proposalId proposalId to check\\n * @return bool true if the proposal has passed, otherwise false\\n */\\n function isPassed(uint32 _proposalId) external view returns (bool);\\n\\n /**\\n * Returns whether the specified address can submit a Proposal with\\n * this [BaseStrategy](../BaseStrategy.md).\\n *\\n * This allows a BaseStrategy to place any limits it would like on\\n * who can create new Proposals, such as requiring a minimum token\\n * delegation.\\n *\\n * @param _address address to check\\n * @return bool true if the address can submit a Proposal, otherwise false\\n */\\n function isProposer(address _address) external view returns (bool);\\n\\n /**\\n * Returns the block number voting ends on a given Proposal.\\n *\\n * @param _proposalId proposalId to check\\n * @return uint32 block number when voting ends on the Proposal\\n */\\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x5ad8cdea65caa49f4116c67ebcbc12094676ac64d70c35643a4cc517c8b220fe\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/interfaces/IERC721VotingStrategy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\n/**\\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\\n * voting strategy.\\n */\\ninterface IERC721VotingStrategy {\\n\\n /**\\n * Returns the current token weight for the given ERC-721 token address.\\n *\\n * @param _tokenAddress the ERC-721 token address\\n */\\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa51db3de9ceb151077007952031ac96263b8138c8ae74758f98a4d5bd71fa86c\",\"license\":\"MIT\"},\"contracts/azorius/strategies/HatsProposalCreationWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\\n event HatWhitelisted(uint256 hatId);\\n event HatRemovedFromWhitelist(uint256 hatId);\\n\\n IHats public hatsContract;\\n\\n /** Array to store whitelisted Hat IDs. */\\n uint256[] private whitelistedHatIds;\\n\\n error InvalidHatsContract();\\n error NoHatsWhitelisted();\\n error HatAlreadyWhitelisted();\\n error HatNotWhitelisted();\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters:\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(bytes memory initializeParams) public virtual {\\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\\n .decode(initializeParams, (address, uint256[]));\\n\\n if (_hatsContract == address(0)) revert InvalidHatsContract();\\n hatsContract = IHats(_hatsContract);\\n\\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\\n _whitelistHat(_initialWhitelistedHats[i]);\\n }\\n }\\n\\n /**\\n * Adds a Hat to the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function whitelistHat(uint256 _hatId) external onlyOwner {\\n _whitelistHat(_hatId);\\n }\\n\\n /**\\n * Internal function to add a Hat to the whitelist.\\n * @param _hatId The ID of the Hat to whitelist\\n */\\n function _whitelistHat(uint256 _hatId) internal {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\\n }\\n whitelistedHatIds.push(_hatId);\\n emit HatWhitelisted(_hatId);\\n }\\n\\n /**\\n * Removes a Hat from the whitelist for proposal creation.\\n * @param _hatId The ID of the Hat to remove from the whitelist\\n */\\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\\n bool found = false;\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (whitelistedHatIds[i] == _hatId) {\\n whitelistedHatIds[i] = whitelistedHatIds[\\n whitelistedHatIds.length - 1\\n ];\\n whitelistedHatIds.pop();\\n found = true;\\n break;\\n }\\n }\\n if (!found) revert HatNotWhitelisted();\\n\\n emit HatRemovedFromWhitelist(_hatId);\\n }\\n\\n /**\\n * @dev Checks if an address is authorized to create proposals.\\n * @param _address The address to check for proposal creation authorization.\\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\\n * @notice This function overrides the isProposer function from the parent contract.\\n * It iterates through all whitelisted Hat IDs and checks if the given address\\n * is wearing any of them using the Hats Protocol.\\n */\\n function isProposer(address _address) public view virtual returns (bool) {\\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns the IDs of all whitelisted Hats.\\n * @return uint256[] memory An array of whitelisted Hat IDs.\\n */\\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\\n return whitelistedHatIds;\\n }\\n}\\n\",\"keccak256\":\"0x4522fb4a6dd1000ccdff9b9e6afd68a65103f791e732fad6ca60dc551a61bde5\",\"license\":\"MIT\"},\"contracts/azorius/strategies/LinearERC721VotingExtensible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity =0.8.19;\\n\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {IERC721VotingStrategy} from \\\"../interfaces/IERC721VotingStrategy.sol\\\";\\nimport {BaseVotingBasisPercent} from \\\"../BaseVotingBasisPercent.sol\\\";\\nimport {IAzorius} from \\\"../interfaces/IAzorius.sol\\\";\\nimport {BaseStrategy} from \\\"../BaseStrategy.sol\\\";\\n\\n/**\\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\\n * each with their own voting weight.\\n *\\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\\n *\\n * Also, this uses \\\"quorumThreshold\\\" rather than LinearERC20Voting's quorumPercent, because the\\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\\n * \\\"total signers\\\" required, rather than a percentage of the tokens.\\n *\\n * This contract is an extensible version of LinearERC721Voting, with all functions\\n * marked as `virtual`. This allows other contracts to inherit from it and override\\n * any part of its functionality. The existence of this contract enables the creation\\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\\n * mechanism while allowing for customization of specific aspects as needed.\\n */\\nabstract contract LinearERC721VotingExtensible is\\n BaseStrategy,\\n BaseVotingBasisPercent,\\n IERC721VotingStrategy\\n{\\n /**\\n * The voting options for a Proposal.\\n */\\n enum VoteType {\\n NO, // disapproves of executing the Proposal\\n YES, // approves of executing the Proposal\\n ABSTAIN // neither YES nor NO, i.e. voting \\\"present\\\"\\n }\\n\\n /**\\n * Defines the current state of votes on a particular Proposal.\\n */\\n struct ProposalVotes {\\n uint32 votingStartBlock; // block that voting starts at\\n uint32 votingEndBlock; // block that voting ends\\n uint256 noVotes; // current number of NO votes for the Proposal\\n uint256 yesVotes; // current number of YES votes for the Proposal\\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\\n /**\\n * ERC-721 contract address to individual NFT id to bool\\n * of whether it has voted on this proposal.\\n */\\n mapping(address => mapping(uint256 => bool)) hasVoted;\\n }\\n\\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\\n mapping(uint256 => ProposalVotes) public proposalVotes;\\n\\n /** The list of ERC-721 tokens that can vote. */\\n address[] public tokenAddresses;\\n\\n /** ERC-721 address to its voting weight per NFT id. */\\n mapping(address => uint256) public tokenWeights;\\n\\n /** Number of blocks a new Proposal can be voted on. */\\n uint32 public votingPeriod;\\n\\n /**\\n * The total number of votes required to achieve quorum.\\n * \\\"Quorum threshold\\\" is used instead of a quorum percent because IERC721 has no\\n * totalSupply function, so the contract cannot determine this.\\n */\\n uint256 public quorumThreshold;\\n\\n /**\\n * The minimum number of voting power required to create a new proposal.\\n */\\n uint256 public proposerThreshold;\\n\\n event VotingPeriodUpdated(uint32 votingPeriod);\\n event QuorumThresholdUpdated(uint256 quorumThreshold);\\n event ProposerThresholdUpdated(uint256 proposerThreshold);\\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\\n event Voted(\\n address voter,\\n uint32 proposalId,\\n uint8 voteType,\\n address[] tokenAddresses,\\n uint256[] tokenIds\\n );\\n event GovernanceTokenAdded(address token, uint256 weight);\\n event GovernanceTokenRemoved(address token);\\n\\n error InvalidParams();\\n error InvalidProposal();\\n error VotingEnded();\\n error InvalidVote();\\n error InvalidTokenAddress();\\n error NoVotingWeight();\\n error TokenAlreadySet();\\n error TokenNotSet();\\n error IdAlreadyVoted(uint256 tokenId);\\n error IdNotOwned(uint256 tokenId);\\n\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\\n * `uint256 _basisNumerator`\\n */\\n function setUp(\\n bytes memory initializeParams\\n ) public virtual override initializer {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _proposerThreshold,\\n uint256 _basisNumerator\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n uint256\\n )\\n );\\n\\n if (_tokens.length != _weights.length) {\\n revert InvalidParams();\\n }\\n\\n for (uint i = 0; i < _tokens.length; ) {\\n _addGovernanceToken(_tokens[i], _weights[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n\\n __Ownable_init();\\n transferOwnership(_owner);\\n _setAzorius(_azoriusModule);\\n _updateQuorumThreshold(_quorumThreshold);\\n _updateProposerThreshold(_proposerThreshold);\\n _updateBasisNumerator(_basisNumerator);\\n _updateVotingPeriod(_votingPeriod);\\n\\n emit StrategySetUp(_azoriusModule, _owner);\\n }\\n\\n /**\\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\\n *\\n * @param _tokenAddress the address of the ERC-721 token\\n * @param _weight the number of votes each NFT id is worth\\n */\\n function addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) external virtual onlyOwner {\\n _addGovernanceToken(_tokenAddress, _weight);\\n }\\n\\n /**\\n * Updates the voting time period for new Proposals.\\n *\\n * @param _votingPeriod voting time period (in blocks)\\n */\\n function updateVotingPeriod(\\n uint32 _votingPeriod\\n ) external virtual onlyOwner {\\n _updateVotingPeriod(_votingPeriod);\\n }\\n\\n /**\\n * Updates the quorum required for future Proposals.\\n *\\n * @param _quorumThreshold total voting weight required to achieve quorum\\n */\\n function updateQuorumThreshold(\\n uint256 _quorumThreshold\\n ) external virtual onlyOwner {\\n _updateQuorumThreshold(_quorumThreshold);\\n }\\n\\n /**\\n * Updates the voting weight required to submit new Proposals.\\n *\\n * @param _proposerThreshold required voting weight\\n */\\n function updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) external virtual onlyOwner {\\n _updateProposerThreshold(_proposerThreshold);\\n }\\n\\n /**\\n * Returns whole list of governance tokens addresses\\n */\\n function getAllTokenAddresses()\\n external\\n view\\n virtual\\n returns (address[] memory)\\n {\\n return tokenAddresses;\\n }\\n\\n /**\\n * Returns the current state of the specified Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @return noVotes current count of \\\"NO\\\" votes\\n * @return yesVotes current count of \\\"YES\\\" votes\\n * @return abstainVotes current count of \\\"ABSTAIN\\\" votes\\n * @return startBlock block number voting starts\\n * @return endBlock block number voting ends\\n */\\n function getProposalVotes(\\n uint32 _proposalId\\n )\\n external\\n view\\n virtual\\n returns (\\n uint256 noVotes,\\n uint256 yesVotes,\\n uint256 abstainVotes,\\n uint32 startBlock,\\n uint32 endBlock\\n )\\n {\\n noVotes = proposalVotes[_proposalId].noVotes;\\n yesVotes = proposalVotes[_proposalId].yesVotes;\\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\\n startBlock = proposalVotes[_proposalId].votingStartBlock;\\n endBlock = proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /**\\n * Submits a vote on an existing Proposal.\\n *\\n * @param _proposalId id of the Proposal to vote on\\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function vote(\\n uint32 _proposalId,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) external virtual {\\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\\n }\\n\\n /** @inheritdoc IERC721VotingStrategy*/\\n function getTokenWeight(\\n address _tokenAddress\\n ) external view virtual override returns (uint256) {\\n return tokenWeights[_tokenAddress];\\n }\\n\\n /**\\n * Returns whether an NFT id has already voted.\\n *\\n * @param _proposalId the id of the Proposal\\n * @param _tokenAddress the ERC-721 contract address\\n * @param _tokenId the unique id of the NFT\\n */\\n function hasVoted(\\n uint32 _proposalId,\\n address _tokenAddress,\\n uint256 _tokenId\\n ) external view virtual returns (bool) {\\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\\n }\\n\\n /**\\n * Removes the given ERC-721 token address from the list of governance tokens.\\n *\\n * @param _tokenAddress the ERC-721 token to remove\\n */\\n function removeGovernanceToken(\\n address _tokenAddress\\n ) external virtual onlyOwner {\\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\\n\\n tokenWeights[_tokenAddress] = 0;\\n\\n uint256 length = tokenAddresses.length;\\n for (uint256 i = 0; i < length; ) {\\n if (_tokenAddress == tokenAddresses[i]) {\\n uint256 last = length - 1;\\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\\n delete tokenAddresses[last]; // delete the last token\\n break;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit GovernanceTokenRemoved(_tokenAddress);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function initializeProposal(\\n bytes memory _data\\n ) public virtual override onlyAzorius {\\n uint32 proposalId = abi.decode(_data, (uint32));\\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\\n\\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\\n\\n emit ProposalInitialized(proposalId, _votingEndBlock);\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isPassed(\\n uint32 _proposalId\\n ) public view virtual override returns (bool) {\\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\\n quorumThreshold <=\\n proposalVotes[_proposalId].yesVotes +\\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\\n meetsBasis(\\n proposalVotes[_proposalId].yesVotes,\\n proposalVotes[_proposalId].noVotes\\n )); // yes votes meets the basis\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function isProposer(\\n address _address\\n ) public view virtual override returns (bool) {\\n uint256 totalWeight = 0;\\n for (uint i = 0; i < tokenAddresses.length; ) {\\n address tokenAddress = tokenAddresses[i];\\n totalWeight +=\\n IERC721(tokenAddress).balanceOf(_address) *\\n tokenWeights[tokenAddress];\\n unchecked {\\n ++i;\\n }\\n }\\n return totalWeight >= proposerThreshold;\\n }\\n\\n /** @inheritdoc BaseStrategy*/\\n function votingEndBlock(\\n uint32 _proposalId\\n ) public view virtual override returns (uint32) {\\n return proposalVotes[_proposalId].votingEndBlock;\\n }\\n\\n /** Internal implementation of `addGovernanceToken` */\\n function _addGovernanceToken(\\n address _tokenAddress,\\n uint256 _weight\\n ) internal virtual {\\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\\n revert InvalidTokenAddress();\\n\\n if (_weight == 0) revert NoVotingWeight();\\n\\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\\n\\n tokenAddresses.push(_tokenAddress);\\n tokenWeights[_tokenAddress] = _weight;\\n\\n emit GovernanceTokenAdded(_tokenAddress, _weight);\\n }\\n\\n /** Internal implementation of `updateVotingPeriod`. */\\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\\n votingPeriod = _votingPeriod;\\n emit VotingPeriodUpdated(_votingPeriod);\\n }\\n\\n /** Internal implementation of `updateQuorumThreshold`. */\\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\\n quorumThreshold = _quorumThreshold;\\n emit QuorumThresholdUpdated(quorumThreshold);\\n }\\n\\n /** Internal implementation of `updateProposerThreshold`. */\\n function _updateProposerThreshold(\\n uint256 _proposerThreshold\\n ) internal virtual {\\n proposerThreshold = _proposerThreshold;\\n emit ProposerThresholdUpdated(_proposerThreshold);\\n }\\n\\n /**\\n * Internal function for casting a vote on a Proposal.\\n *\\n * @param _proposalId id of the Proposal\\n * @param _voter address casting the vote\\n * @param _voteType vote support, as defined in VoteType\\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\\n */\\n function _vote(\\n uint32 _proposalId,\\n address _voter,\\n uint8 _voteType,\\n address[] memory _tokenAddresses,\\n uint256[] memory _tokenIds\\n ) internal virtual {\\n uint256 weight;\\n\\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\\n // to vote twice if you get more weight later on\\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\\n address tokenAddress = _tokenAddresses[i];\\n uint256 tokenId = _tokenIds[i];\\n\\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\\n revert IdNotOwned(tokenId);\\n }\\n\\n if (\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\\n true\\n ) {\\n revert IdAlreadyVoted(tokenId);\\n }\\n\\n weight += tokenWeights[tokenAddress];\\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (weight == 0) revert NoVotingWeight();\\n\\n ProposalVotes storage proposal = proposalVotes[_proposalId];\\n\\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\\n\\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\\n\\n if (_voteType == uint8(VoteType.NO)) {\\n proposal.noVotes += weight;\\n } else if (_voteType == uint8(VoteType.YES)) {\\n proposal.yesVotes += weight;\\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\\n proposal.abstainVotes += weight;\\n } else {\\n revert InvalidVote();\\n }\\n\\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\\n }\\n}\\n\",\"keccak256\":\"0xd4080f58d0b3abe47b825f0b43fc5061143319a93de5ff8752b6591d3effef75\",\"license\":\"LGPL-3.0-only\"},\"contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.19;\\n\\nimport {LinearERC721VotingExtensible} from \\\"./LinearERC721VotingExtensible.sol\\\";\\nimport {HatsProposalCreationWhitelist} from \\\"./HatsProposalCreationWhitelist.sol\\\";\\nimport {IHats} from \\\"../../interfaces/hats/IHats.sol\\\";\\n\\n/**\\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\\n * restricted to users wearing whitelisted Hats.\\n */\\ncontract LinearERC721VotingWithHatsProposalCreation is\\n HatsProposalCreationWhitelist,\\n LinearERC721VotingExtensible\\n{\\n /**\\n * Sets up the contract with its initial parameters.\\n *\\n * @param initializeParams encoded initialization parameters: `address _owner`,\\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\\n */\\n function setUp(\\n bytes memory initializeParams\\n )\\n public\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n {\\n (\\n address _owner,\\n address[] memory _tokens,\\n uint256[] memory _weights,\\n address _azoriusModule,\\n uint32 _votingPeriod,\\n uint256 _quorumThreshold,\\n uint256 _basisNumerator,\\n address _hatsContract,\\n uint256[] memory _initialWhitelistedHats\\n ) = abi.decode(\\n initializeParams,\\n (\\n address,\\n address[],\\n uint256[],\\n address,\\n uint32,\\n uint256,\\n uint256,\\n address,\\n uint256[]\\n )\\n );\\n\\n LinearERC721VotingExtensible.setUp(\\n abi.encode(\\n _owner,\\n _tokens,\\n _weights,\\n _azoriusModule,\\n _votingPeriod,\\n _quorumThreshold,\\n 0, // _proposerThreshold is zero because we only care about the hat check\\n _basisNumerator\\n )\\n );\\n\\n HatsProposalCreationWhitelist.setUp(\\n abi.encode(_hatsContract, _initialWhitelistedHats)\\n );\\n }\\n\\n /** @inheritdoc HatsProposalCreationWhitelist*/\\n function isProposer(\\n address _address\\n )\\n public\\n view\\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\\n returns (bool)\\n {\\n return HatsProposalCreationWhitelist.isProposer(_address);\\n }\\n}\\n\",\"keccak256\":\"0x78f0f627fe0f63c7d1ae8ec0333f0e55d801412f34b7597b12e9007a23fcd0d7\",\"license\":\"MIT\"},\"contracts/interfaces/hats/HatsErrors.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsErrors {\\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\\n error NotAdmin(address user, uint256 hatId);\\n\\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\\n error NotHatWearer();\\n\\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\\n error NotAdminOrWearer();\\n\\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\\n error AllHatsWorn(uint256 hatId);\\n\\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\\n error MaxLevelsReached();\\n\\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\\n error InvalidHatId();\\n\\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\\n error AlreadyWearingHat(address wearer, uint256 hatId);\\n\\n /// @notice Emitted when attempting to mint a non-existant hat\\n error HatDoesNotExist(uint256 hatId);\\n\\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\\n error HatNotActive();\\n\\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\\n error NotEligible();\\n\\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\\n error NotHatsToggle();\\n\\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\\n error NotHatsEligibility();\\n\\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\\n error BatchArrayLengthMismatch();\\n\\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\\n error Immutable();\\n\\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\\n error NewMaxSupplyTooLow();\\n\\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\\n error CircularLinkage();\\n\\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\\n error CrossTreeLinkage();\\n\\n /// @notice Emitted when attempting to link a tophat without a request\\n error LinkageNotRequested();\\n\\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\\n /// @dev This ensures that unlinking never results in a bricked tophat\\n error InvalidUnlink();\\n\\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\\n error ZeroAddress();\\n\\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\\n error StringTooLong();\\n}\\n\",\"keccak256\":\"0x81b0056b7bed86eabc07c0e4a9655c586ddb8e6c128320593669b76efd5a08de\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/HatsEvents.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface HatsEvents {\\n /// @notice Emitted when a new hat is created\\n /// @param id The id for the new hat\\n /// @param details A description of the Hat\\n /// @param maxSupply The total instances of the Hat that can be worn at once\\n /// @param eligibility The address that can report on the Hat wearer's status\\n /// @param toggle The address that can deactivate the Hat\\n /// @param mutable_ Whether the hat's properties are changeable after creation\\n /// @param imageURI The image uri for this hat and the fallback for its\\n event HatCreated(\\n uint256 id,\\n string details,\\n uint32 maxSupply,\\n address eligibility,\\n address toggle,\\n bool mutable_,\\n string imageURI\\n );\\n\\n /// @notice Emitted when a hat wearer's standing is updated\\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\\n /// @param hatId The id of the wearer's hat\\n /// @param wearer The wearer's address\\n /// @param wearerStanding Whether the wearer is in good standing for the hat\\n event WearerStandingChanged(\\n uint256 hatId,\\n address wearer,\\n bool wearerStanding\\n );\\n\\n /// @notice Emitted when a hat's status is updated\\n /// @param hatId The id of the hat\\n /// @param newStatus Whether the hat is active\\n event HatStatusChanged(uint256 hatId, bool newStatus);\\n\\n /// @notice Emitted when a hat's details are updated\\n /// @param hatId The id of the hat\\n /// @param newDetails The updated details\\n event HatDetailsChanged(uint256 hatId, string newDetails);\\n\\n /// @notice Emitted when a hat's eligibility module is updated\\n /// @param hatId The id of the hat\\n /// @param newEligibility The updated eligibiliy module\\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\\n\\n /// @notice Emitted when a hat's toggle module is updated\\n /// @param hatId The id of the hat\\n /// @param newToggle The updated toggle module\\n event HatToggleChanged(uint256 hatId, address newToggle);\\n\\n /// @notice Emitted when a hat's mutability is updated\\n /// @param hatId The id of the hat\\n event HatMutabilityChanged(uint256 hatId);\\n\\n /// @notice Emitted when a hat's maximum supply is updated\\n /// @param hatId The id of the hat\\n /// @param newMaxSupply The updated max supply\\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\\n\\n /// @notice Emitted when a hat's image URI is updated\\n /// @param hatId The id of the hat\\n /// @param newImageURI The updated image URI\\n event HatImageURIChanged(uint256 hatId, string newImageURI);\\n\\n /// @notice Emitted when a tophat linkage is requested by its admin\\n /// @param domain The domain of the tree tophat to link\\n /// @param newAdmin The tophat's would-be admin in the parent tree\\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\\n\\n /// @notice Emitted when a tophat is linked to a another tree\\n /// @param domain The domain of the newly-linked tophat\\n /// @param newAdmin The tophat's new admin in the parent tree\\n event TopHatLinked(uint32 domain, uint256 newAdmin);\\n}\\n\",\"keccak256\":\"0x53413397d15e1636c3cd7bd667656b79bc2886785403b824bcd4ed122667f2c6\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHats.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\nimport \\\"./IHatsIdUtilities.sol\\\";\\nimport \\\"./HatsErrors.sol\\\";\\nimport \\\"./HatsEvents.sol\\\";\\n\\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\\n function mintTopHat(\\n address _target,\\n string memory _details,\\n string memory _imageURI\\n ) external returns (uint256 topHatId);\\n\\n function createHat(\\n uint256 _admin,\\n string calldata _details,\\n uint32 _maxSupply,\\n address _eligibility,\\n address _toggle,\\n bool _mutable,\\n string calldata _imageURI\\n ) external returns (uint256 newHatId);\\n\\n function batchCreateHats(\\n uint256[] calldata _admins,\\n string[] calldata _details,\\n uint32[] calldata _maxSupplies,\\n address[] memory _eligibilityModules,\\n address[] memory _toggleModules,\\n bool[] calldata _mutables,\\n string[] calldata _imageURIs\\n ) external returns (bool success);\\n\\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\\n\\n function mintHat(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool success);\\n\\n function batchMintHats(\\n uint256[] calldata _hatIds,\\n address[] calldata _wearers\\n ) external returns (bool success);\\n\\n function setHatStatus(\\n uint256 _hatId,\\n bool _newStatus\\n ) external returns (bool toggled);\\n\\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\\n\\n function setHatWearerStatus(\\n uint256 _hatId,\\n address _wearer,\\n bool _eligible,\\n bool _standing\\n ) external returns (bool updated);\\n\\n function checkHatWearerStatus(\\n uint256 _hatId,\\n address _wearer\\n ) external returns (bool updated);\\n\\n function renounceHat(uint256 _hatId) external;\\n\\n function transferHat(uint256 _hatId, address _from, address _to) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n HATS ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function makeHatImmutable(uint256 _hatId) external;\\n\\n function changeHatDetails(\\n uint256 _hatId,\\n string memory _newDetails\\n ) external;\\n\\n function changeHatEligibility(\\n uint256 _hatId,\\n address _newEligibility\\n ) external;\\n\\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\\n\\n function changeHatImageURI(\\n uint256 _hatId,\\n string memory _newImageURI\\n ) external;\\n\\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\\n\\n function requestLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat\\n ) external;\\n\\n function approveLinkTopHatToTree(\\n uint32 _topHatId,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\\n\\n function relinkTopHatWithinTree(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat,\\n address _eligibility,\\n address _toggle,\\n string calldata _details,\\n string calldata _imageURI\\n ) external;\\n\\n /*//////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function viewHat(\\n uint256 _hatId\\n )\\n external\\n view\\n returns (\\n string memory details,\\n uint32 maxSupply,\\n uint32 supply,\\n address eligibility,\\n address toggle,\\n string memory imageURI,\\n uint16 lastHatId,\\n bool mutable_,\\n bool active\\n );\\n\\n function isWearerOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isWearer);\\n\\n function isAdminOfHat(\\n address _user,\\n uint256 _hatId\\n ) external view returns (bool isAdmin);\\n\\n function isInGoodStanding(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool standing);\\n\\n function isEligible(\\n address _wearer,\\n uint256 _hatId\\n ) external view returns (bool eligible);\\n\\n function getHatEligibilityModule(\\n uint256 _hatId\\n ) external view returns (address eligibility);\\n\\n function getHatToggleModule(\\n uint256 _hatId\\n ) external view returns (address toggle);\\n\\n function getHatMaxSupply(\\n uint256 _hatId\\n ) external view returns (uint32 maxSupply);\\n\\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\\n\\n function getImageURIForHat(\\n uint256 _hatId\\n ) external view returns (string memory _uri);\\n\\n function balanceOf(\\n address wearer,\\n uint256 hatId\\n ) external view returns (uint256 balance);\\n\\n function balanceOfBatch(\\n address[] calldata _wearers,\\n uint256[] calldata _hatIds\\n ) external view returns (uint256[] memory);\\n\\n function uri(uint256 id) external view returns (string memory _uri);\\n}\\n\",\"keccak256\":\"0x2867004bddc5148fa1937f25c0403e5d9977583aaf50fdbdb74bd463f64f21c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/hats/IHatsIdUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\n// Copyright (C) 2023 Haberdasher Labs\\n//\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.8.13;\\n\\ninterface IHatsIdUtilities {\\n function buildHatId(\\n uint256 _admin,\\n uint16 _newHat\\n ) external pure returns (uint256 id);\\n\\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\\n\\n function getLocalHatLevel(\\n uint256 _hatId\\n ) external pure returns (uint32 level);\\n\\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\\n\\n function isLocalTopHat(\\n uint256 _hatId\\n ) external pure returns (bool _localTopHat);\\n\\n function isValidHatId(\\n uint256 _hatId\\n ) external view returns (bool validHatId);\\n\\n function getAdminAtLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external view returns (uint256 admin);\\n\\n function getAdminAtLocalLevel(\\n uint256 _hatId,\\n uint32 _level\\n ) external pure returns (uint256 admin);\\n\\n function getTopHatDomain(\\n uint256 _hatId\\n ) external view returns (uint32 domain);\\n\\n function getTippyTopHatDomain(\\n uint32 _topHatDomain\\n ) external view returns (uint32 domain);\\n\\n function noCircularLinkage(\\n uint32 _topHatDomain,\\n uint256 _linkedAdmin\\n ) external view returns (bool notCircular);\\n\\n function sameTippyTopHatDomain(\\n uint32 _topHatDomain,\\n uint256 _newAdminHat\\n ) external view returns (bool sameDomain);\\n}\\n\",\"keccak256\":\"0x007fcc07b20bf84bacad1f9a2ddf4e30e1a8be961e144b7bef8e98a51781aee9\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61220680620000ee6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80638081be911161011a578063b1d1196f116100ad578063d877ee1d1161007c578063d877ee1d14610537578063deb61c1514610540578063e5df8b84146105b9578063e8575a7f146105cc578063f2fde38b146105df57600080fd5b8063b1d1196f146104bb578063bf7e2c7f146104ce578063c0dce37f146104d7578063c909c3b1146104ea57600080fd5b8063a09c4f68116100e9578063a09c4f6814610462578063a4f9edbf14610475578063a77a81d014610488578063ab2f3ad41461049b57600080fd5b80638081be91146104215780638da5cb5b1461042b578063918f84bf1461043c57806397e39fef1461044f57600080fd5b806353a8b3201161019d5780636d4ae6801161016c5780636d4ae680146103d3578063715018a6146103e857806372d75d76146103f057806374ec29a0146104055780637b7a91dd1461041857600080fd5b806353a8b320146102e0578063544ffc9c1461030357806355a9dbd91461037857806366b62955146103a857600080fd5b806333f48a5e116101d957806333f48a5e1461029457806337938ab3146102a75780633a622c52146102ba5780634e2addad146102cd57600080fd5b806302a251a31461020b5780631dc4894714610235578063210a5e871461024a578063250aa6831461025d575b600080fd5b606c5461021b9063ffffffff1681565b60405163ffffffff90911681526020015b60405180910390f35b610248610243366004611891565b6105f2565b005b610248610258366004611891565b610606565b61028661026b3660046118bf565b6001600160a01b03166000908152606b602052604090205490565b60405190815260200161022c565b6102486102a23660046118f5565b610617565b6102486102b53660046118bf565b610628565b6102486102c8366004611891565b61067a565b6102486102db3660046119e8565b610797565b6102f36102ee3660046118f5565b6107cc565b604051901515815260200161022c565b610348610311366004611891565b606960205260009081526040902080546001820154600283015460039093015463ffffffff80841694600160201b90940416929085565b6040805163ffffffff9687168152959094166020860152928401919091526060830152608082015260a00161022c565b61021b6103863660046118f5565b63ffffffff908116600090815260696020526040902054600160201b90041690565b6067546103bb906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b6103db61085e565b60405161022c9190611b1b565b6102486108c0565b6103f86108d4565b60405161022c9190611b5e565b6102f36104133660046118bf565b61092b565b610286606d5481565b610286620f424081565b6033546001600160a01b03166103bb565b6102f361044a366004611b71565b610936565b6065546103bb906001600160a01b031681565b610248610470366004611891565b610968565b610248610483366004611b93565b610979565b610248610496366004611b93565b610a1a565b6102866104a93660046118bf565b606b6020526000908152604090205481565b6102486104c9366004611c28565b610af9565b61028660685481565b6102486104e53660046118bf565b610b0f565b6102f36104f8366004611c54565b63ffffffff831660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff169392505050565b610286606e5481565b61058861054e3660046118f5565b63ffffffff908116600090815260696020526040902060018101546002820154600383015492549194909382811692600160201b90041690565b6040805195865260208601949094529284019190915263ffffffff908116606084015216608082015260a00161022c565b6103bb6105c7366004611891565b610c99565b6102486105da366004611891565b610cc3565b6102486105ed3660046118bf565b610cd4565b6105fa610d4f565b61060381610da9565b50565b61060e610d4f565b61060381610de5565b61061f610d4f565b61060381610e1a565b610630610d4f565b606780546001600160a01b0319166001600160a01b0383169081179091556040517fac8d831a6ed53a98387842e08d9e0893c1d478f4a3710b254e22bd58c06b269090600090a250565b610682610d4f565b6000805b6066548110156107405782606682815481106106a4576106a4611c95565b90600052602060002001540361072e57606680546106c490600190611cc1565b815481106106d4576106d4611c95565b9060005260206000200154606682815481106106f2576106f2611c95565b600091825260209091200155606680548061070f5761070f611cd4565b6001900381819060005260206000200160009055905560019150610740565b8061073881611cea565b915050610686565b508061075f57604051634b8d041f60e01b815260040160405180910390fd5b6040518281527f50544666722f5a4554f2716b5efb2ce814101451643c8856221fef06b5e9803b906020015b60405180910390a15050565b80518251146107b957604051635435b28960e11b815260040160405180910390fd5b6107c68433858585610e62565b50505050565b63ffffffff8082166000908152606960205260408120549091600160201b9091041643118015610827575063ffffffff8216600090815260696020526040902060038101546002909101546108219190611d03565b606d5411155b8015610858575063ffffffff8216600090815260696020526040902060028101546001909101546108589190610936565b92915050565b6060606a8054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610898575b5050505050905090565b6108c8610d4f565b6108d26000611179565b565b606060668054806020026020016040519081016040528092919081815260200182805480156108b657602002820191906000526020600020905b81548152602001906001019080831161090e575050505050905090565b6000610858826111cb565b6000620f4240606854838561094b9190611d03565b6109559190611d16565b61095f9190611d2d565b90921192915050565b610970610d4f565b610603816112a6565b60008060008060008060008060008980602001905181019061099b9190611e29565b9850985098509850985098509850985098506109e489898989898960008a6040516020016109d0989796959493929190611f08565b604051602081830303815290604052611368565b610a0e82826040516020016109fa929190611f76565b604051602081830303815290604052611593565b50505050505050505050565b6067546001600160a01b03163314610a45576040516358c30ce160e01b815260040160405180910390fd5b600081806020019051810190610a5b9190611fa2565b606c54909150600090610a749063ffffffff1643611fbf565b63ffffffff838116600081815260696020908152604091829020805467ffffffffffffffff1916600160201b87871690810263ffffffff1916919091174390961695909517905581519283528201929092529192507f80d0ad93bba25e53bf67fa9f2d13df59f04795ec2f91b9b3c1f607666daf9d64910160405180910390a1505050565b610b01610d4f565b610b0b8282611653565b5050565b610b17610d4f565b6001600160a01b0381166000908152606b60205260408120549003610b4f57604051634b62f01360e01b815260040160405180910390fd5b6001600160a01b0381166000908152606b60205260408120819055606a54905b81811015610c5f57606a8181548110610b8a57610b8a611c95565b6000918252602090912001546001600160a01b0390811690841603610c57576000610bb6600184611cc1565b9050606a8181548110610bcb57610bcb611c95565b600091825260209091200154606a80546001600160a01b039092169184908110610bf757610bf7611c95565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606a8181548110610c3857610c38611c95565b600091825260209091200180546001600160a01b031916905550610c5f565b600101610b6f565b506040516001600160a01b03831681527f14236c39816f331325d02993fa15113b739aff01c21ab8f38cc5253205299fb19060200161078b565b606a8181548110610ca957600080fd5b6000918252602090912001546001600160a01b0316905081565b610ccb610d4f565b610603816117c7565b610cdc610d4f565b6001600160a01b038116610d465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61060381611179565b6033546001600160a01b031633146108d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d3d565b606e8190556040518181527f48f79e03d92b3595f74bc3c64746cf148e464673dd036633d34f8afb029482c9906020015b60405180910390a150565b606d8190556040518181527fbc589fccf641d342b7853c2c6faca39631d4d19efbe77e71e5611e31678c220e90602001610dda565b606c805463ffffffff191663ffffffff83169081179091556040519081527f70770ce479f70673c3ed8fff63cfb758a6ffdddc30cab7c63d54c8d825e3948890602001610dda565b6000805b835181101561101e576000848281518110610e8357610e83611c95565b602002602001015190506000848381518110610ea157610ea1611c95565b60200260200101519050816001600160a01b0316636352211e826040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190611fe3565b6001600160a01b0316886001600160a01b031614610f4e57604051639b936ae960e01b815260048101829052602401610d3d565b63ffffffff891660009081526069602090815260408083206001600160a01b0386168452600401825280832084845290915290205460ff161515600103610fab57604051639602f71160e01b815260048101829052602401610d3d565b6001600160a01b0382166000908152606b6020526040902054610fce9085611d03565b63ffffffff8a1660009081526069602090815260408083206001600160a01b0390961683526004909501815284822093825292909252919020805460ff1916600190811790915590925001610e66565b50806000036110405760405163923d21f560e01b815260040160405180910390fd5b63ffffffff808716600090815260696020526040812080549092600160201b90910416900361108257604051631dc0650160e31b815260040160405180910390fd5b8054600160201b900463ffffffff164311156110b157604051637a19ed0560e01b815260040160405180910390fd5b60ff85166110d857818160010160008282546110cd9190611d03565b909155506111319050565b60001960ff8616016110f857818160020160008282546110cd9190611d03565b60011960ff86160161111857818160030160008282546110cd9190611d03565b604051636aee863360e11b815260040160405180910390fd5b7f08b8dec2438455807ba4dae88b27939d599858b97389310c0af8f42acd58d6208688878787604051611168959493929190612000565b60405180910390a150505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805b60665481101561129d57606554606680546001600160a01b0390921691634352409a9186918590811061120457611204611c95565b6000918252602090912001546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015611259573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127d9190612057565b1561128b5750600192915050565b8061129581611cea565b9150506111cf565b50600092915050565b60005b6066548110156113025781606682815481106112c7576112c7611c95565b9060005260206000200154036112f05760405163634a456360e01b815260040160405180910390fd5b806112fa81611cea565b9150506112a9565b50606680546001810182556000919091527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e94354018190556040518181527f30590a8684cec4e5a2b48765f391c996b9a004652478a8f41dc46658ccb699ed90602001610dda565b600054610100900460ff16158080156113885750600054600160ff909116105b806113a25750303b1580156113a2575060005460ff166001145b6114055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d3d565b6000805460ff191660011790558015611428576000805461ff0019166101001790555b600080600080600080600080898060200190518101906114489190612079565b97509750975097509750975097509750855187511461147a57604051635435b28960e11b815260040160405180910390fd5b60005b87518110156114ca576114c288828151811061149b5761149b611c95565b60200260200101518883815181106114b5576114b5611c95565b6020026020010151611653565b60010161147d565b506114d3611837565b6114dc88610cd4565b6114e585610630565b6114ee83610de5565b6114f782610da9565b611500816117c7565b61150984610e1a565b876001600160a01b0316856001600160a01b03167fca32f512f02914f6bc16a49e786443029061b9adc5a987fd2f6efa56c0116a1660405160405180910390a350505050505050508015610b0b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161078b565b600080828060200190518101906115aa9190612134565b90925090506001600160a01b0382166115d6576040516350e80d4360e11b815260040160405180910390fd5b606580546001600160a01b0319166001600160a01b038416179055805160000361161357604051632a2b50e760e01b815260040160405180910390fd5b60005b81518110156107c65761164182828151811061163457611634611c95565b60200260200101516112a6565b8061164b81611cea565b915050611616565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa15801561169e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c29190612057565b6116df57604051630f58058360e11b815260040160405180910390fd5b806000036117005760405163923d21f560e01b815260040160405180910390fd5b6001600160a01b0382166000908152606b602052604090205415611737576040516371168e4f60e11b815260040160405180910390fd5b606a8054600181019091557f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319166001600160a01b0384169081179091556000818152606b6020908152604091829020849055815192835282018390527fbf2b7f9fc6e849fdef9ff7366d8b63b608bc69ca778200c53d77372d953dc6b6910161078b565b620f42408111806117e457506117e16002620f4240611d2d565b81105b15611802576040516302396b6b60e61b815260040160405180910390fd5b60688190556040518181527f406c076eac4d3dde1c5d55793e80239daa8c60ee971390ce3d9f90ca4206295390602001610dda565b600054610100900460ff1661185e5760405162461bcd60e51b8152600401610d3d90612185565b6108d2600054610100900460ff166118885760405162461bcd60e51b8152600401610d3d90612185565b6108d233611179565b6000602082840312156118a357600080fd5b5035919050565b6001600160a01b038116811461060357600080fd5b6000602082840312156118d157600080fd5b81356118dc816118aa565b9392505050565b63ffffffff8116811461060357600080fd5b60006020828403121561190757600080fd5b81356118dc816118e3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561195157611951611912565b604052919050565b600067ffffffffffffffff82111561197357611973611912565b5060051b60200190565b600082601f83011261198e57600080fd5b813560206119a361199e83611959565b611928565b82815260059290921b840181019181810190868411156119c257600080fd5b8286015b848110156119dd57803583529183019183016119c6565b509695505050505050565b600080600080608085870312156119fe57600080fd5b8435611a09816118e3565b935060208581013560ff81168114611a2057600080fd5b9350604086013567ffffffffffffffff80821115611a3d57600080fd5b818801915088601f830112611a5157600080fd5b8135611a5f61199e82611959565b81815260059190911b8301840190848101908b831115611a7e57600080fd5b938501935b82851015611aa5578435611a96816118aa565b82529385019390850190611a83565b965050506060880135925080831115611abd57600080fd5b5050611acb8782880161197d565b91505092959194509250565b600081518084526020808501945080840160005b83811015611b105781516001600160a01b031687529582019590820190600101611aeb565b509495945050505050565b6020815260006118dc6020830184611ad7565b600081518084526020808501945080840160005b83811015611b1057815187529582019590820190600101611b42565b6020815260006118dc6020830184611b2e565b60008060408385031215611b8457600080fd5b50508035926020909101359150565b60006020808385031215611ba657600080fd5b823567ffffffffffffffff80821115611bbe57600080fd5b818501915085601f830112611bd257600080fd5b813581811115611be457611be4611912565b611bf6601f8201601f19168501611928565b91508082528684828501011115611c0c57600080fd5b8084840185840137600090820190930192909252509392505050565b60008060408385031215611c3b57600080fd5b8235611c46816118aa565b946020939093013593505050565b600080600060608486031215611c6957600080fd5b8335611c74816118e3565b92506020840135611c84816118aa565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561085857610858611cab565b634e487b7160e01b600052603160045260246000fd5b600060018201611cfc57611cfc611cab565b5060010190565b8082018082111561085857610858611cab565b808202811582820484141761085857610858611cab565b600082611d4a57634e487b7160e01b600052601260045260246000fd5b500490565b8051611d5a816118aa565b919050565b600082601f830112611d7057600080fd5b81516020611d8061199e83611959565b82815260059290921b84018101918181019086841115611d9f57600080fd5b8286015b848110156119dd578051611db6816118aa565b8352918301918301611da3565b600082601f830112611dd457600080fd5b81516020611de461199e83611959565b82815260059290921b84018101918181019086841115611e0357600080fd5b8286015b848110156119dd5780518352918301918301611e07565b8051611d5a816118e3565b60008060008060008060008060006101208a8c031215611e4857600080fd5b611e518a611d4f565b985060208a015167ffffffffffffffff80821115611e6e57600080fd5b611e7a8d838e01611d5f565b995060408c0151915080821115611e9057600080fd5b611e9c8d838e01611dc3565b9850611eaa60608d01611d4f565b9750611eb860808d01611e1e565b965060a08c0151955060c08c01519450611ed460e08d01611d4f565b93506101008c0151915080821115611eeb57600080fd5b50611ef88c828d01611dc3565b9150509295985092959850929598565b6001600160a01b03898116825261010060208301819052600091611f2e8483018c611ad7565b91508382036040850152611f42828b611b2e565b98166060840152505063ffffffff94909416608085015260a084019290925260ff1660c083015260e0909101529392505050565b6001600160a01b0383168152604060208201819052600090611f9a90830184611b2e565b949350505050565b600060208284031215611fb457600080fd5b81516118dc816118e3565b63ffffffff818116838216019080821115611fdc57611fdc611cab565b5092915050565b600060208284031215611ff557600080fd5b81516118dc816118aa565b6001600160a01b038616815263ffffffff8516602082015260ff8416604082015260a06060820181905260009061203990830185611ad7565b828103608084015261204b8185611b2e565b98975050505050505050565b60006020828403121561206957600080fd5b815180151581146118dc57600080fd5b600080600080600080600080610100898b03121561209657600080fd5b88516120a1816118aa565b60208a015190985067ffffffffffffffff808211156120bf57600080fd5b6120cb8c838d01611d5f565b985060408b01519150808211156120e157600080fd5b506120ee8b828c01611dc3565b96505060608901516120ff816118aa565b60808a0151909550612110816118e3565b60a08a015160c08b015160e0909b0151999c989b5096999598909790945092505050565b6000806040838503121561214757600080fd5b8251612152816118aa565b602084015190925067ffffffffffffffff81111561216f57600080fd5b61217b85828601611dc3565b9150509250929050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203fe7d7d70da87315089a4e4d61815cc5a6b9b0a117c3c6558ce259443ec5f05664736f6c63430008130033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "addGovernanceToken(address,uint256)": { + "params": { + "_tokenAddress": "the address of the ERC-721 token", + "_weight": "the number of votes each NFT id is worth" + } + }, + "getProposalVotes(uint32)": { + "params": { + "_proposalId": "id of the Proposal" + }, + "returns": { + "abstainVotes": "current count of \"ABSTAIN\" votes", + "endBlock": "block number voting ends", + "noVotes": "current count of \"NO\" votes", + "startBlock": "block number voting starts", + "yesVotes": "current count of \"YES\" votes" + } + }, + "getTokenWeight(address)": { + "params": { + "_tokenAddress": "the ERC-721 token address" + } + }, + "getWhitelistedHatIds()": { + "details": "Returns the IDs of all whitelisted Hats.", + "returns": { + "_0": "uint256[] memory An array of whitelisted Hat IDs." + } + }, + "hasVoted(uint32,address,uint256)": { + "params": { + "_proposalId": "the id of the Proposal", + "_tokenAddress": "the ERC-721 contract address", + "_tokenId": "the unique id of the NFT" + } + }, + "initializeProposal(bytes)": { + "params": { + "_data": "arbitrary data to pass to this BaseStrategy" + } + }, + "isPassed(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "bool true if the proposal has passed, otherwise false" + } + }, + "isProposer(address)": { + "details": "Checks if an address is authorized to create proposals.", + "params": { + "_address": "The address to check for proposal creation authorization." + }, + "returns": { + "_0": "bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise." + } + }, + "meetsBasis(uint256,uint256)": { + "params": { + "_noVotes": "number of votes against", + "_yesVotes": "number of votes in favor" + }, + "returns": { + "_0": "bool whether the yes votes meets the set basis" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "removeGovernanceToken(address)": { + "params": { + "_tokenAddress": "the ERC-721 token to remove" + } + }, + "removeHatFromWhitelist(uint256)": { + "params": { + "_hatId": "The ID of the Hat to remove from the whitelist" + } + }, + "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." + }, + "setAzorius(address)": { + "params": { + "_azoriusModule": "address of the Azorius Safe module" + } + }, + "setUp(bytes)": { + "params": { + "initializeParams": "encoded initialization parameters: `address _owner`, `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`, `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`, `address _hatsContract`, `uint256[] _initialWhitelistedHats`" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateBasisNumerator(uint256)": { + "params": { + "_basisNumerator": "numerator to use" + } + }, + "updateProposerThreshold(uint256)": { + "params": { + "_proposerThreshold": "required voting weight" + } + }, + "updateQuorumThreshold(uint256)": { + "params": { + "_quorumThreshold": "total voting weight required to achieve quorum" + } + }, + "updateVotingPeriod(uint32)": { + "params": { + "_votingPeriod": "voting time period (in blocks)" + } + }, + "vote(uint32,uint8,address[],uint256[])": { + "params": { + "_proposalId": "id of the Proposal to vote on", + "_tokenAddresses": "list of ERC-721 addresses that correspond to ids in _tokenIds", + "_tokenIds": "list of unique token ids that correspond to their ERC-721 address in _tokenAddresses", + "_voteType": "Proposal support as defined in VoteType (NO, YES, ABSTAIN)" + } + }, + "votingEndBlock(uint32)": { + "params": { + "_proposalId": "proposalId to check" + }, + "returns": { + "_0": "uint32 block number when voting ends on the Proposal" + } + }, + "whitelistHat(uint256)": { + "params": { + "_hatId": "The ID of the Hat to whitelist" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "BASIS_DENOMINATOR()": { + "notice": "The denominator to use when calculating basis (1,000,000). " + }, + "addGovernanceToken(address,uint256)": { + "notice": "Adds a new ERC-721 token as a governance token, along with its associated weight." + }, + "basisNumerator()": { + "notice": "The numerator to use when calculating basis (adjustable). " + }, + "getAllTokenAddresses()": { + "notice": "Returns whole list of governance tokens addresses" + }, + "getProposalVotes(uint32)": { + "notice": "Returns the current state of the specified Proposal." + }, + "getTokenWeight(address)": { + "notice": "Returns the current token weight for the given ERC-721 token address." + }, + "hasVoted(uint32,address,uint256)": { + "notice": "Returns whether an NFT id has already voted." + }, + "initializeProposal(bytes)": { + "notice": "Called by the [Azorius](../Azorius.md) module. This notifies this [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created." + }, + "isPassed(uint32)": { + "notice": "Returns whether a Proposal has been passed." + }, + "isProposer(address)": { + "notice": "This function overrides the isProposer function from the parent contract. It iterates through all whitelisted Hat IDs and checks if the given address is wearing any of them using the Hats Protocol." + }, + "meetsBasis(uint256,uint256)": { + "notice": "Calculates whether a vote meets its basis." + }, + "proposalVotes(uint256)": { + "notice": "`proposalId` to `ProposalVotes`, the voting state of a Proposal. " + }, + "proposerThreshold()": { + "notice": "The minimum number of voting power required to create a new proposal." + }, + "quorumThreshold()": { + "notice": "The total number of votes required to achieve quorum. \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no totalSupply function, so the contract cannot determine this." + }, + "removeGovernanceToken(address)": { + "notice": "Removes the given ERC-721 token address from the list of governance tokens." + }, + "removeHatFromWhitelist(uint256)": { + "notice": "Removes a Hat from the whitelist for proposal creation." + }, + "setAzorius(address)": { + "notice": "Sets the address of the [Azorius](../Azorius.md) contract this [BaseStrategy](../BaseStrategy.md) is being used on." + }, + "setUp(bytes)": { + "notice": "Sets up the contract with its initial parameters." + }, + "tokenAddresses(uint256)": { + "notice": "The list of ERC-721 tokens that can vote. " + }, + "tokenWeights(address)": { + "notice": "ERC-721 address to its voting weight per NFT id. " + }, + "updateBasisNumerator(uint256)": { + "notice": "Updates the `basisNumerator` for future Proposals." + }, + "updateProposerThreshold(uint256)": { + "notice": "Updates the voting weight required to submit new Proposals." + }, + "updateQuorumThreshold(uint256)": { + "notice": "Updates the quorum required for future Proposals." + }, + "updateVotingPeriod(uint32)": { + "notice": "Updates the voting time period for new Proposals." + }, + "vote(uint32,uint8,address[],uint256[])": { + "notice": "Submits a vote on an existing Proposal." + }, + "votingEndBlock(uint32)": { + "notice": "Returns the block number voting ends on a given Proposal." + }, + "votingPeriod()": { + "notice": "Number of blocks a new Proposal can be voted on. " + }, + "whitelistHat(uint256)": { + "notice": "Adds a Hat to the whitelist for proposal creation." + } + }, + "notice": "An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation restricted to users wearing whitelisted Hats.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 156, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 159, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 584, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 28, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 148, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1349, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hatsContract", + "offset": 0, + "slot": "101", + "type": "t_contract(IHats)3915" + }, + { + "astId": 1353, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "whitelistedHatIds", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 912, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "azoriusModule", + "offset": 0, + "slot": "103", + "type": "t_contract(IAzorius)1278" + }, + { + "astId": 1012, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "basisNumerator", + "offset": 0, + "slot": "104", + "type": "t_uint256" + }, + { + "astId": 2378, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposalVotes", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)" + }, + { + "astId": 2382, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenAddresses", + "offset": 0, + "slot": "106", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 2387, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "tokenWeights", + "offset": 0, + "slot": "107", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2390, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingPeriod", + "offset": 0, + "slot": "108", + "type": "t_uint32" + }, + { + "astId": 2393, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "quorumThreshold", + "offset": 0, + "slot": "109", + "type": "t_uint256" + }, + { + "astId": 2396, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "proposerThreshold", + "offset": 0, + "slot": "110", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAzorius)1278": { + "encoding": "inplace", + "label": "contract IAzorius", + "numberOfBytes": "20" + }, + "t_contract(IHats)3915": { + "encoding": "inplace", + "label": "contract IHats", + "numberOfBytes": "20" + }, + "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_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => 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_mapping(t_uint256,t_struct(ProposalVotes)2372_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LinearERC721VotingExtensible.ProposalVotes)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVotes)2372_storage" + }, + "t_struct(ProposalVotes)2372_storage": { + "encoding": "inplace", + "label": "struct LinearERC721VotingExtensible.ProposalVotes", + "members": [ + { + "astId": 2356, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingStartBlock", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2358, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "votingEndBlock", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 2360, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "noVotes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2362, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 2364, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "abstainVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2371, + "contract": "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol:LinearERC721VotingWithHatsProposalCreation", + "label": "hasVoted", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json b/deployments/sepolia/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json new file mode 100644 index 0000000..df3a3a7 --- /dev/null +++ b/deployments/sepolia/solcInputs/af493beb8ac3dcaf17411aefc1e2bf83.json @@ -0,0 +1,107 @@ +{ + "language": "Solidity", + "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" + }, + "@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/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" + }, + "@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/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/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\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/azorius/BaseQuorumPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based quorums.\n * Intended to be implemented by [BaseStrategy](./BaseStrategy.md) implementations.\n */\nabstract contract BaseQuorumPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating quorum (adjustable). */\n uint256 public quorumNumerator;\n\n /** The denominator to use when calculating quorum (1,000,000). */\n uint256 public constant QUORUM_DENOMINATOR = 1_000_000;\n\n /** Ensures the numerator cannot be larger than the denominator. */\n error InvalidQuorumNumerator();\n\n event QuorumNumeratorUpdated(uint256 quorumNumerator);\n\n /** \n * Updates the quorum required for future Proposals.\n *\n * @param _quorumNumerator numerator to use when calculating quorum (over 1,000,000)\n */\n function updateQuorumNumerator(uint256 _quorumNumerator) public virtual onlyOwner {\n _updateQuorumNumerator(_quorumNumerator);\n }\n\n /** Internal implementation of `updateQuorumNumerator`. */\n function _updateQuorumNumerator(uint256 _quorumNumerator) internal virtual {\n if (_quorumNumerator > QUORUM_DENOMINATOR)\n revert InvalidQuorumNumerator();\n\n quorumNumerator = _quorumNumerator;\n\n emit QuorumNumeratorUpdated(_quorumNumerator);\n }\n\n /**\n * Calculates whether a vote meets quorum. This is calculated based on yes votes + abstain\n * votes.\n *\n * @param _totalSupply the total supply of tokens\n * @param _yesVotes number of votes in favor\n * @param _abstainVotes number of votes abstaining\n * @return bool whether the total number of yes votes + abstain meets the quorum\n */\n function meetsQuorum(uint256 _totalSupply, uint256 _yesVotes, uint256 _abstainVotes) public view returns (bool) {\n return _yesVotes + _abstainVotes >= (_totalSupply * quorumNumerator) / QUORUM_DENOMINATOR;\n }\n\n /**\n * Calculates the total number of votes required for a proposal to meet quorum.\n * \n * @param _proposalId The ID of the proposal to get quorum votes for\n * @return uint256 The quantity of votes required to meet quorum\n */\n function quorumVotes(uint32 _proposalId) public view virtual returns (uint256);\n}\n" + }, + "contracts/azorius/BaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { IAzorius } from \"./interfaces/IAzorius.sol\";\nimport { IBaseStrategy } from \"./interfaces/IBaseStrategy.sol\";\nimport { FactoryFriendly } from \"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\";\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * The base abstract contract for all voting strategies in Azorius.\n */\nabstract contract BaseStrategy is OwnableUpgradeable, FactoryFriendly, IBaseStrategy {\n\n event AzoriusSet(address indexed azoriusModule);\n event StrategySetUp(address indexed azoriusModule, address indexed owner);\n\n error OnlyAzorius();\n\n IAzorius public azoriusModule;\n\n /**\n * Ensures that only the [Azorius](./Azorius.md) contract that pertains to this \n * [BaseStrategy](./BaseStrategy.md) can call functions on it.\n */\n modifier onlyAzorius() {\n if (msg.sender != address(azoriusModule)) revert OnlyAzorius();\n _;\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /** @inheritdoc IBaseStrategy*/\n function setAzorius(address _azoriusModule) external onlyOwner {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n\n /** @inheritdoc IBaseStrategy*/\n function initializeProposal(bytes memory _data) external virtual;\n\n /** @inheritdoc IBaseStrategy*/\n function isPassed(uint32 _proposalId) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function isProposer(address _address) external view virtual returns (bool);\n\n /** @inheritdoc IBaseStrategy*/\n function votingEndBlock(uint32 _proposalId) external view virtual returns (uint32);\n\n /**\n * Sets the address of the [Azorius](Azorius.md) module contract.\n *\n * @param _azoriusModule address of the Azorius module\n */\n function _setAzorius(address _azoriusModule) internal {\n azoriusModule = IAzorius(_azoriusModule);\n emit AzoriusSet(_azoriusModule);\n }\n}\n" + }, + "contracts/azorius/BaseVotingBasisPercent.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport { OwnableUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/**\n * An Azorius extension contract that enables percent based voting basis calculations.\n *\n * Intended to be implemented by BaseStrategy implementations, this allows for voting strategies\n * to dictate any basis strategy for passing a Proposal between >50% (simple majority) to 100%.\n *\n * See https://en.wikipedia.org/wiki/Voting#Voting_basis.\n * See https://en.wikipedia.org/wiki/Supermajority.\n */\nabstract contract BaseVotingBasisPercent is OwnableUpgradeable {\n \n /** The numerator to use when calculating basis (adjustable). */\n uint256 public basisNumerator;\n\n /** The denominator to use when calculating basis (1,000,000). */\n uint256 public constant BASIS_DENOMINATOR = 1_000_000;\n\n error InvalidBasisNumerator();\n\n event BasisNumeratorUpdated(uint256 basisNumerator);\n\n /**\n * Updates the `basisNumerator` for future Proposals.\n *\n * @param _basisNumerator numerator to use\n */\n function updateBasisNumerator(uint256 _basisNumerator) public virtual onlyOwner {\n _updateBasisNumerator(_basisNumerator);\n }\n\n /** Internal implementation of `updateBasisNumerator`. */\n function _updateBasisNumerator(uint256 _basisNumerator) internal virtual {\n if (_basisNumerator > BASIS_DENOMINATOR || _basisNumerator < BASIS_DENOMINATOR / 2)\n revert InvalidBasisNumerator();\n\n basisNumerator = _basisNumerator;\n\n emit BasisNumeratorUpdated(_basisNumerator);\n }\n\n /**\n * Calculates whether a vote meets its basis.\n *\n * @param _yesVotes number of votes in favor\n * @param _noVotes number of votes against\n * @return bool whether the yes votes meets the set basis\n */\n function meetsBasis(uint256 _yesVotes, uint256 _noVotes) public view returns (bool) {\n return _yesVotes > (_yesVotes + _noVotes) * basisNumerator / BASIS_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/interfaces/IAzorius.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport { Enum } from \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\n/**\n * The base interface for the Azorius governance Safe module.\n * Azorius conforms to the Zodiac pattern for Safe modules: https://github.com/gnosis/zodiac\n *\n * Azorius manages the state of Proposals submitted to a DAO, along with the associated strategies\n * ([BaseStrategy](../BaseStrategy.md)) for voting that are enabled on the DAO.\n *\n * Any given DAO can support multiple voting BaseStrategies, and these strategies are intended to be\n * as customizable as possible.\n *\n * Proposals begin in the `ACTIVE` state and will ultimately end in either\n * the `EXECUTED`, `EXPIRED`, or `FAILED` state.\n *\n * `ACTIVE` - a new proposal begins in this state, and stays in this state\n * for the duration of its voting period.\n *\n * `TIMELOCKED` - A proposal that passes enters the `TIMELOCKED` state, during which\n * it cannot yet be executed. This is to allow time for token holders\n * to potentially exit their position, as well as parent DAOs time to\n * initiate a freeze, if they choose to do so. A proposal stays timelocked\n * for the duration of its `timelockPeriod`.\n *\n * `EXECUTABLE` - Following the `TIMELOCKED` state, a passed proposal becomes `EXECUTABLE`,\n * and can then finally be executed on chain by anyone.\n *\n * `EXECUTED` - the final state for a passed proposal. The proposal has been executed\n * on the blockchain.\n *\n * `EXPIRED` - a passed proposal which is not executed before its `executionPeriod` has\n * elapsed will be `EXPIRED`, and can no longer be executed.\n *\n * `FAILED` - a failed proposal (as defined by its [BaseStrategy](../BaseStrategy.md) \n * `isPassed` function). For a basic strategy, this would mean it received more \n * NO votes than YES or did not achieve quorum. \n */\ninterface IAzorius {\n\n /** Represents a transaction to perform on the blockchain. */\n struct Transaction {\n address to; // destination address of the transaction\n uint256 value; // amount of ETH to transfer with the transaction\n bytes data; // encoded function call data of the transaction\n Enum.Operation operation; // Operation type, Call or DelegateCall\n }\n\n /** Holds details pertaining to a single proposal. */\n struct Proposal {\n uint32 executionCounter; // count of transactions that have been executed within the proposal\n uint32 timelockPeriod; // time (in blocks) this proposal will be timelocked for if it passes\n uint32 executionPeriod; // time (in blocks) this proposal has to be executed after timelock ends before it is expired\n address strategy; // BaseStrategy contract this proposal was created on\n bytes32[] txHashes; // hashes of the transactions that are being proposed\n }\n\n /** The list of states in which a Proposal can be in at any given time. */\n enum ProposalState {\n ACTIVE,\n TIMELOCKED,\n EXECUTABLE,\n EXECUTED,\n EXPIRED,\n FAILED\n }\n\n /**\n * Enables a [BaseStrategy](../BaseStrategy.md) implementation for newly created Proposals.\n *\n * Multiple strategies can be enabled, and new Proposals will be able to be\n * created using any of the currently enabled strategies.\n *\n * @param _strategy contract address of the BaseStrategy to be enabled\n */\n function enableStrategy(address _strategy) external;\n\n /**\n * Disables a previously enabled [BaseStrategy](../BaseStrategy.md) implementation for new proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _prevStrategy BaseStrategy address that pointed in the linked list to the strategy to be removed\n * @param _strategy address of the BaseStrategy to be removed\n */\n function disableStrategy(address _prevStrategy, address _strategy) external;\n\n /**\n * Updates the `timelockPeriod` for newly created Proposals.\n * This has no effect on existing Proposals, either `ACTIVE` or completed.\n *\n * @param _timelockPeriod timelockPeriod (in blocks) to be used for new Proposals\n */\n function updateTimelockPeriod(uint32 _timelockPeriod) external;\n\n /**\n * Updates the execution period for future Proposals.\n *\n * @param _executionPeriod new execution period (in blocks)\n */\n function updateExecutionPeriod(uint32 _executionPeriod) external;\n\n /**\n * Submits a new Proposal, using one of the enabled [BaseStrategies](../BaseStrategy.md).\n * New Proposals begin immediately in the `ACTIVE` state.\n *\n * @param _strategy address of the BaseStrategy implementation which the Proposal will use\n * @param _data arbitrary data passed to the BaseStrategy implementation. This may not be used by all strategies, \n * but is included in case future strategy contracts have a need for it\n * @param _transactions array of transactions to propose\n * @param _metadata additional data such as a title/description to submit with the proposal\n */\n function submitProposal(\n address _strategy,\n bytes memory _data,\n Transaction[] calldata _transactions,\n string calldata _metadata\n ) external;\n\n /**\n * Executes all transactions within a Proposal.\n * This will only be able to be called if the Proposal passed.\n *\n * @param _proposalId identifier of the Proposal\n * @param _targets target contracts for each transaction\n * @param _values ETH values to be sent with each transaction\n * @param _data transaction data to be executed\n * @param _operations Calls or Delegatecalls\n */\n function executeProposal(\n uint32 _proposalId,\n address[] memory _targets,\n uint256[] memory _values,\n bytes[] memory _data,\n Enum.Operation[] memory _operations\n ) external;\n\n /**\n * Returns whether a [BaseStrategy](../BaseStrategy.md) implementation is enabled.\n *\n * @param _strategy contract address of the BaseStrategy to check\n * @return bool True if the strategy is enabled, otherwise False\n */\n function isStrategyEnabled(address _strategy) external view returns (bool);\n\n /**\n * Returns an array of enabled [BaseStrategy](../BaseStrategy.md) contract addresses.\n * Because the list of BaseStrategies is technically unbounded, this\n * requires the address of the first strategy you would like, along\n * with the total count of strategies to return, rather than\n * returning the whole list at once.\n *\n * @param _startAddress contract address of the BaseStrategy to start with\n * @param _count maximum number of BaseStrategies that should be returned\n * @return _strategies array of BaseStrategies\n * @return _next next BaseStrategy contract address in the linked list\n */\n function getStrategies(\n address _startAddress,\n uint256 _count\n ) external view returns (address[] memory _strategies, address _next);\n\n /**\n * Gets the state of a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return ProposalState uint256 ProposalState enum value representing the\n * current state of the proposal\n */\n function proposalState(uint32 _proposalId) external view returns (ProposalState);\n\n /**\n * Generates the data for the module transaction hash (required for signing).\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @param _nonce Safe nonce of the transaction\n * @return bytes hashed transaction data\n */\n function generateTxHashData(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation,\n uint256 _nonce\n ) external view returns (bytes memory);\n\n /**\n * Returns the `keccak256` hash of the specified transaction.\n *\n * @param _to target address of the transaction\n * @param _value ETH value to send with the transaction\n * @param _data encoded function call data of the transaction\n * @param _operation Enum.Operation to use for the transaction\n * @return bytes32 transaction hash\n */\n function getTxHash(\n address _to,\n uint256 _value,\n bytes memory _data,\n Enum.Operation _operation\n ) external view returns (bytes32);\n\n /**\n * Returns the hash of a transaction in a Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @param _txIndex index of the transaction within the Proposal\n * @return bytes32 hash of the specified transaction\n */\n function getProposalTxHash(uint32 _proposalId, uint32 _txIndex) external view returns (bytes32);\n\n /**\n * Returns the transaction hashes associated with a given `proposalId`.\n *\n * @param _proposalId identifier of the Proposal to get transaction hashes for\n * @return bytes32[] array of transaction hashes\n */\n function getProposalTxHashes(uint32 _proposalId) external view returns (bytes32[] memory);\n\n /**\n * Returns details about the specified Proposal.\n *\n * @param _proposalId identifier of the Proposal\n * @return _strategy address of the BaseStrategy contract the Proposal is on\n * @return _txHashes hashes of the transactions the Proposal contains\n * @return _timelockPeriod time (in blocks) the Proposal is timelocked for\n * @return _executionPeriod time (in blocks) the Proposal must be executed within, after timelock ends\n * @return _executionCounter counter of how many of the Proposals transactions have been executed\n */\n function getProposal(uint32 _proposalId) external view\n returns (\n address _strategy,\n bytes32[] memory _txHashes,\n uint32 _timelockPeriod,\n uint32 _executionPeriod,\n uint32 _executionCounter\n );\n}\n" + }, + "contracts/azorius/interfaces/IBaseStrategy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\n/**\n * The specification for a voting strategy in Azorius.\n *\n * Each IBaseStrategy implementation need only implement the given functions here,\n * which allows for highly composable but simple or complex voting strategies.\n *\n * It should be noted that while many voting strategies make use of parameters such as\n * voting period or quorum, that is a detail of the individual strategy itself, and not\n * a requirement for the Azorius protocol.\n */\ninterface IBaseStrategy {\n\n /**\n * Sets the address of the [Azorius](../Azorius.md) contract this \n * [BaseStrategy](../BaseStrategy.md) is being used on.\n *\n * @param _azoriusModule address of the Azorius Safe module\n */\n function setAzorius(address _azoriusModule) external;\n\n /**\n * Called by the [Azorius](../Azorius.md) module. This notifies this \n * [BaseStrategy](../BaseStrategy.md) that a new Proposal has been created.\n *\n * @param _data arbitrary data to pass to this BaseStrategy\n */\n function initializeProposal(bytes memory _data) external;\n\n /**\n * Returns whether a Proposal has been passed.\n *\n * @param _proposalId proposalId to check\n * @return bool true if the proposal has passed, otherwise false\n */\n function isPassed(uint32 _proposalId) external view returns (bool);\n\n /**\n * Returns whether the specified address can submit a Proposal with\n * this [BaseStrategy](../BaseStrategy.md).\n *\n * This allows a BaseStrategy to place any limits it would like on\n * who can create new Proposals, such as requiring a minimum token\n * delegation.\n *\n * @param _address address to check\n * @return bool true if the address can submit a Proposal, otherwise false\n */\n function isProposer(address _address) external view returns (bool);\n\n /**\n * Returns the block number voting ends on a given Proposal.\n *\n * @param _proposalId proposalId to check\n * @return uint32 block number when voting ends on the Proposal\n */\n function votingEndBlock(uint32 _proposalId) external view returns (uint32);\n}\n" + }, + "contracts/azorius/interfaces/IERC721VotingStrategy.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\n/**\n * Interface of functions required for ERC-721 freeze voting associated with an ERC-721\n * voting strategy.\n */\ninterface IERC721VotingStrategy {\n\n /**\n * Returns the current token weight for the given ERC-721 token address.\n *\n * @param _tokenAddress the ERC-721 token address\n */\n function getTokenWeight(address _tokenAddress) external view returns (uint256);\n}\n" + }, + "contracts/azorius/strategies/HatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\nabstract contract HatsProposalCreationWhitelist is OwnableUpgradeable {\n event HatWhitelisted(uint256 hatId);\n event HatRemovedFromWhitelist(uint256 hatId);\n\n IHats public hatsContract;\n\n /** Array to store whitelisted Hat IDs. */\n uint256[] private whitelistedHatIds;\n\n error InvalidHatsContract();\n error NoHatsWhitelisted();\n error HatAlreadyWhitelisted();\n error HatNotWhitelisted();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters:\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(bytes memory initializeParams) public virtual {\n (address _hatsContract, uint256[] memory _initialWhitelistedHats) = abi\n .decode(initializeParams, (address, uint256[]));\n\n if (_hatsContract == address(0)) revert InvalidHatsContract();\n hatsContract = IHats(_hatsContract);\n\n if (_initialWhitelistedHats.length == 0) revert NoHatsWhitelisted();\n for (uint256 i = 0; i < _initialWhitelistedHats.length; i++) {\n _whitelistHat(_initialWhitelistedHats[i]);\n }\n }\n\n /**\n * Adds a Hat to the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to whitelist\n */\n function whitelistHat(uint256 _hatId) external onlyOwner {\n _whitelistHat(_hatId);\n }\n\n /**\n * Internal function to add a Hat to the whitelist.\n * @param _hatId The ID of the Hat to whitelist\n */\n function _whitelistHat(uint256 _hatId) internal {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) revert HatAlreadyWhitelisted();\n }\n whitelistedHatIds.push(_hatId);\n emit HatWhitelisted(_hatId);\n }\n\n /**\n * Removes a Hat from the whitelist for proposal creation.\n * @param _hatId The ID of the Hat to remove from the whitelist\n */\n function removeHatFromWhitelist(uint256 _hatId) external onlyOwner {\n bool found = false;\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (whitelistedHatIds[i] == _hatId) {\n whitelistedHatIds[i] = whitelistedHatIds[\n whitelistedHatIds.length - 1\n ];\n whitelistedHatIds.pop();\n found = true;\n break;\n }\n }\n if (!found) revert HatNotWhitelisted();\n\n emit HatRemovedFromWhitelist(_hatId);\n }\n\n /**\n * @dev Checks if an address is authorized to create proposals.\n * @param _address The address to check for proposal creation authorization.\n * @return bool Returns true if the address is wearing any of the whitelisted Hats, false otherwise.\n * @notice This function overrides the isProposer function from the parent contract.\n * It iterates through all whitelisted Hat IDs and checks if the given address\n * is wearing any of them using the Hats Protocol.\n */\n function isProposer(address _address) public view virtual returns (bool) {\n for (uint256 i = 0; i < whitelistedHatIds.length; i++) {\n if (hatsContract.isWearerOfHat(_address, whitelistedHatIds[i])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @dev Returns the IDs of all whitelisted Hats.\n * @return uint256[] memory An array of whitelisted Hat IDs.\n */\n function getWhitelistedHatIds() public view returns (uint256[] memory) {\n return whitelistedHatIds;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IVotes} from \"@openzeppelin/contracts/governance/utils/IVotes.sol\";\nimport {BaseStrategy, IBaseStrategy} from \"../BaseStrategy.sol\";\nimport {BaseQuorumPercent} from \"../BaseQuorumPercent.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) token voting. Each token delegated to a given address\n * in an `ERC20Votes` token equals 1 vote for a Proposal.\n *\n * This contract is an extensible version of LinearERC20Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC20 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC20VotingExtensible is\n BaseStrategy,\n BaseQuorumPercent,\n BaseVotingBasisPercent\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n mapping(address => bool) hasVoted; // whether a given address has voted yet or not\n }\n\n IVotes public governanceToken;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /** Voting weight required to be able to submit Proposals. */\n uint256 public requiredProposerWeight;\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) internal proposalVotes;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event RequiredProposerWeightUpdated(uint256 requiredProposerWeight);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n uint256 weight\n );\n\n error InvalidProposal();\n error VotingEnded();\n error AlreadyVoted();\n error InvalidVote();\n error InvalidTokenAddress();\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `IVotes _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _requiredProposerWeight`, `uint256 _quorumNumerator`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n IVotes _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _requiredProposerWeight,\n uint256 _quorumNumerator,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (address, IVotes, address, uint32, uint256, uint256, uint256)\n );\n if (address(_governanceToken) == address(0))\n revert InvalidTokenAddress();\n\n governanceToken = _governanceToken;\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumNumerator(_quorumNumerator);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n _updateRequiredProposerWeight(_requiredProposerWeight);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _requiredProposerWeight required token voting weight\n */\n function updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) external virtual onlyOwner {\n _updateRequiredProposerWeight(_requiredProposerWeight);\n }\n\n /**\n * Casts votes for a Proposal, equal to the caller's token delegation.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n */\n function vote(uint32 _proposalId, uint8 _voteType) external virtual {\n _vote(\n _proposalId,\n msg.sender,\n _voteType,\n getVotingWeight(msg.sender, _proposalId)\n );\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock,\n uint256 votingSupply\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n votingSupply = getProposalVotingSupply(_proposalId);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /**\n * Returns whether an address has voted on the specified Proposal.\n *\n * @param _proposalId id of the Proposal to check\n * @param _address address to check\n * @return bool true if the address has voted on the Proposal, otherwise false\n */\n function hasVoted(\n uint32 _proposalId,\n address _address\n ) public view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_address];\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n meetsQuorum(\n getProposalVotingSupply(_proposalId),\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].abstainVotes\n ) && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /**\n * Returns a snapshot of total voting supply for a given Proposal. Because token supplies can change,\n * it is necessary to calculate quorum from the supply available at the time of the Proposal's creation,\n * not when it is being voted on passes / fails.\n *\n * @param _proposalId id of the Proposal\n * @return uint256 voting supply snapshot for the given _proposalId\n */\n function getProposalVotingSupply(\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastTotalSupply(\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /**\n * Calculates the voting weight an address has for a specific Proposal.\n *\n * @param _voter address of the voter\n * @param _proposalId id of the Proposal\n * @return uint256 the address' voting weight\n */\n function getVotingWeight(\n address _voter,\n uint32 _proposalId\n ) public view virtual returns (uint256) {\n return\n governanceToken.getPastVotes(\n _voter,\n proposalVotes[_proposalId].votingStartBlock\n );\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n return\n governanceToken.getPastVotes(_address, block.number - 1) >=\n requiredProposerWeight;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateRequiredProposerWeight`. */\n function _updateRequiredProposerWeight(\n uint256 _requiredProposerWeight\n ) internal virtual {\n requiredProposerWeight = _requiredProposerWeight;\n emit RequiredProposerWeightUpdated(_requiredProposerWeight);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _weight amount of voting weight cast, typically the\n * total number of tokens delegated\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n uint256 _weight\n ) internal virtual {\n if (proposalVotes[_proposalId].votingEndBlock == 0)\n revert InvalidProposal();\n if (block.number > proposalVotes[_proposalId].votingEndBlock)\n revert VotingEnded();\n if (proposalVotes[_proposalId].hasVoted[_voter]) revert AlreadyVoted();\n\n proposalVotes[_proposalId].hasVoted[_voter] = true;\n\n if (_voteType == uint8(VoteType.NO)) {\n proposalVotes[_proposalId].noVotes += _weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposalVotes[_proposalId].yesVotes += _weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposalVotes[_proposalId].abstainVotes += _weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _weight);\n }\n\n /** @inheritdoc BaseQuorumPercent*/\n function quorumVotes(\n uint32 _proposalId\n ) public view virtual override returns (uint256) {\n return\n (quorumNumerator * getProposalVotingSupply(_proposalId)) /\n QUORUM_DENOMINATOR;\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC20VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {LinearERC20VotingExtensible} from \"./LinearERC20VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC20 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC20VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC20VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address _governanceToken`, `address _azoriusModule`, `uint32 _votingPeriod`,\n * `uint256 _quorumNumerator`, `uint256 _basisNumerator`, `address _hatsContract`,\n * `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n {\n (\n address _owner,\n address _governanceToken,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumNumerator,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address,\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC20VotingExtensible.setUp(\n abi.encode(\n _owner,\n _governanceToken,\n _azoriusModule,\n _votingPeriod,\n 0, // requiredProposerWeight is zero because we only care about the hat check\n _quorumNumerator,\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC20VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingExtensible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity =0.8.19;\n\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {IERC721VotingStrategy} from \"../interfaces/IERC721VotingStrategy.sol\";\nimport {BaseVotingBasisPercent} from \"../BaseVotingBasisPercent.sol\";\nimport {IAzorius} from \"../interfaces/IAzorius.sol\";\nimport {BaseStrategy} from \"../BaseStrategy.sol\";\n\n/**\n * An Azorius strategy that allows multiple ERC721 tokens to be registered as governance tokens,\n * each with their own voting weight.\n *\n * This is slightly different from ERC-20 voting, since there is no way to snapshot ERC721 holdings.\n * Each ERC721 id can vote once, reguardless of what address held it when a proposal was created.\n *\n * Also, this uses \"quorumThreshold\" rather than LinearERC20Voting's quorumPercent, because the\n * total supply of NFTs is not knowable within the IERC721 interface. This is similar to a multisig\n * \"total signers\" required, rather than a percentage of the tokens.\n *\n * This contract is an extensible version of LinearERC721Voting, with all functions\n * marked as `virtual`. This allows other contracts to inherit from it and override\n * any part of its functionality. The existence of this contract enables the creation\n * of more specialized voting strategies that build upon the basic linear ERC721 voting\n * mechanism while allowing for customization of specific aspects as needed.\n */\nabstract contract LinearERC721VotingExtensible is\n BaseStrategy,\n BaseVotingBasisPercent,\n IERC721VotingStrategy\n{\n /**\n * The voting options for a Proposal.\n */\n enum VoteType {\n NO, // disapproves of executing the Proposal\n YES, // approves of executing the Proposal\n ABSTAIN // neither YES nor NO, i.e. voting \"present\"\n }\n\n /**\n * Defines the current state of votes on a particular Proposal.\n */\n struct ProposalVotes {\n uint32 votingStartBlock; // block that voting starts at\n uint32 votingEndBlock; // block that voting ends\n uint256 noVotes; // current number of NO votes for the Proposal\n uint256 yesVotes; // current number of YES votes for the Proposal\n uint256 abstainVotes; // current number of ABSTAIN votes for the Proposal\n /**\n * ERC-721 contract address to individual NFT id to bool\n * of whether it has voted on this proposal.\n */\n mapping(address => mapping(uint256 => bool)) hasVoted;\n }\n\n /** `proposalId` to `ProposalVotes`, the voting state of a Proposal. */\n mapping(uint256 => ProposalVotes) public proposalVotes;\n\n /** The list of ERC-721 tokens that can vote. */\n address[] public tokenAddresses;\n\n /** ERC-721 address to its voting weight per NFT id. */\n mapping(address => uint256) public tokenWeights;\n\n /** Number of blocks a new Proposal can be voted on. */\n uint32 public votingPeriod;\n\n /**\n * The total number of votes required to achieve quorum.\n * \"Quorum threshold\" is used instead of a quorum percent because IERC721 has no\n * totalSupply function, so the contract cannot determine this.\n */\n uint256 public quorumThreshold;\n\n /**\n * The minimum number of voting power required to create a new proposal.\n */\n uint256 public proposerThreshold;\n\n event VotingPeriodUpdated(uint32 votingPeriod);\n event QuorumThresholdUpdated(uint256 quorumThreshold);\n event ProposerThresholdUpdated(uint256 proposerThreshold);\n event ProposalInitialized(uint32 proposalId, uint32 votingEndBlock);\n event Voted(\n address voter,\n uint32 proposalId,\n uint8 voteType,\n address[] tokenAddresses,\n uint256[] tokenIds\n );\n event GovernanceTokenAdded(address token, uint256 weight);\n event GovernanceTokenRemoved(address token);\n\n error InvalidParams();\n error InvalidProposal();\n error VotingEnded();\n error InvalidVote();\n error InvalidTokenAddress();\n error NoVotingWeight();\n error TokenAlreadySet();\n error TokenNotSet();\n error IdAlreadyVoted(uint256 tokenId);\n error IdNotOwned(uint256 tokenId);\n\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _proposerThreshold`,\n * `uint256 _basisNumerator`\n */\n function setUp(\n bytes memory initializeParams\n ) public virtual override initializer {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _proposerThreshold,\n uint256 _basisNumerator\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n uint256\n )\n );\n\n if (_tokens.length != _weights.length) {\n revert InvalidParams();\n }\n\n for (uint i = 0; i < _tokens.length; ) {\n _addGovernanceToken(_tokens[i], _weights[i]);\n unchecked {\n ++i;\n }\n }\n\n __Ownable_init();\n transferOwnership(_owner);\n _setAzorius(_azoriusModule);\n _updateQuorumThreshold(_quorumThreshold);\n _updateProposerThreshold(_proposerThreshold);\n _updateBasisNumerator(_basisNumerator);\n _updateVotingPeriod(_votingPeriod);\n\n emit StrategySetUp(_azoriusModule, _owner);\n }\n\n /**\n * Adds a new ERC-721 token as a governance token, along with its associated weight.\n *\n * @param _tokenAddress the address of the ERC-721 token\n * @param _weight the number of votes each NFT id is worth\n */\n function addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) external virtual onlyOwner {\n _addGovernanceToken(_tokenAddress, _weight);\n }\n\n /**\n * Updates the voting time period for new Proposals.\n *\n * @param _votingPeriod voting time period (in blocks)\n */\n function updateVotingPeriod(\n uint32 _votingPeriod\n ) external virtual onlyOwner {\n _updateVotingPeriod(_votingPeriod);\n }\n\n /**\n * Updates the quorum required for future Proposals.\n *\n * @param _quorumThreshold total voting weight required to achieve quorum\n */\n function updateQuorumThreshold(\n uint256 _quorumThreshold\n ) external virtual onlyOwner {\n _updateQuorumThreshold(_quorumThreshold);\n }\n\n /**\n * Updates the voting weight required to submit new Proposals.\n *\n * @param _proposerThreshold required voting weight\n */\n function updateProposerThreshold(\n uint256 _proposerThreshold\n ) external virtual onlyOwner {\n _updateProposerThreshold(_proposerThreshold);\n }\n\n /**\n * Returns whole list of governance tokens addresses\n */\n function getAllTokenAddresses()\n external\n view\n virtual\n returns (address[] memory)\n {\n return tokenAddresses;\n }\n\n /**\n * Returns the current state of the specified Proposal.\n *\n * @param _proposalId id of the Proposal\n * @return noVotes current count of \"NO\" votes\n * @return yesVotes current count of \"YES\" votes\n * @return abstainVotes current count of \"ABSTAIN\" votes\n * @return startBlock block number voting starts\n * @return endBlock block number voting ends\n */\n function getProposalVotes(\n uint32 _proposalId\n )\n external\n view\n virtual\n returns (\n uint256 noVotes,\n uint256 yesVotes,\n uint256 abstainVotes,\n uint32 startBlock,\n uint32 endBlock\n )\n {\n noVotes = proposalVotes[_proposalId].noVotes;\n yesVotes = proposalVotes[_proposalId].yesVotes;\n abstainVotes = proposalVotes[_proposalId].abstainVotes;\n startBlock = proposalVotes[_proposalId].votingStartBlock;\n endBlock = proposalVotes[_proposalId].votingEndBlock;\n }\n\n /**\n * Submits a vote on an existing Proposal.\n *\n * @param _proposalId id of the Proposal to vote on\n * @param _voteType Proposal support as defined in VoteType (NO, YES, ABSTAIN)\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function vote(\n uint32 _proposalId,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) external virtual {\n if (_tokenAddresses.length != _tokenIds.length) revert InvalidParams();\n _vote(_proposalId, msg.sender, _voteType, _tokenAddresses, _tokenIds);\n }\n\n /** @inheritdoc IERC721VotingStrategy*/\n function getTokenWeight(\n address _tokenAddress\n ) external view virtual override returns (uint256) {\n return tokenWeights[_tokenAddress];\n }\n\n /**\n * Returns whether an NFT id has already voted.\n *\n * @param _proposalId the id of the Proposal\n * @param _tokenAddress the ERC-721 contract address\n * @param _tokenId the unique id of the NFT\n */\n function hasVoted(\n uint32 _proposalId,\n address _tokenAddress,\n uint256 _tokenId\n ) external view virtual returns (bool) {\n return proposalVotes[_proposalId].hasVoted[_tokenAddress][_tokenId];\n }\n\n /**\n * Removes the given ERC-721 token address from the list of governance tokens.\n *\n * @param _tokenAddress the ERC-721 token to remove\n */\n function removeGovernanceToken(\n address _tokenAddress\n ) external virtual onlyOwner {\n if (tokenWeights[_tokenAddress] == 0) revert TokenNotSet();\n\n tokenWeights[_tokenAddress] = 0;\n\n uint256 length = tokenAddresses.length;\n for (uint256 i = 0; i < length; ) {\n if (_tokenAddress == tokenAddresses[i]) {\n uint256 last = length - 1;\n tokenAddresses[i] = tokenAddresses[last]; // move the last token into the position to remove\n delete tokenAddresses[last]; // delete the last token\n break;\n }\n unchecked {\n ++i;\n }\n }\n\n emit GovernanceTokenRemoved(_tokenAddress);\n }\n\n /** @inheritdoc BaseStrategy*/\n function initializeProposal(\n bytes memory _data\n ) public virtual override onlyAzorius {\n uint32 proposalId = abi.decode(_data, (uint32));\n uint32 _votingEndBlock = uint32(block.number) + votingPeriod;\n\n proposalVotes[proposalId].votingEndBlock = _votingEndBlock;\n proposalVotes[proposalId].votingStartBlock = uint32(block.number);\n\n emit ProposalInitialized(proposalId, _votingEndBlock);\n }\n\n /** @inheritdoc BaseStrategy*/\n function isPassed(\n uint32 _proposalId\n ) public view virtual override returns (bool) {\n return (block.number > proposalVotes[_proposalId].votingEndBlock && // voting period has ended\n quorumThreshold <=\n proposalVotes[_proposalId].yesVotes +\n proposalVotes[_proposalId].abstainVotes && // yes + abstain votes meets the quorum\n meetsBasis(\n proposalVotes[_proposalId].yesVotes,\n proposalVotes[_proposalId].noVotes\n )); // yes votes meets the basis\n }\n\n /** @inheritdoc BaseStrategy*/\n function isProposer(\n address _address\n ) public view virtual override returns (bool) {\n uint256 totalWeight = 0;\n for (uint i = 0; i < tokenAddresses.length; ) {\n address tokenAddress = tokenAddresses[i];\n totalWeight +=\n IERC721(tokenAddress).balanceOf(_address) *\n tokenWeights[tokenAddress];\n unchecked {\n ++i;\n }\n }\n return totalWeight >= proposerThreshold;\n }\n\n /** @inheritdoc BaseStrategy*/\n function votingEndBlock(\n uint32 _proposalId\n ) public view virtual override returns (uint32) {\n return proposalVotes[_proposalId].votingEndBlock;\n }\n\n /** Internal implementation of `addGovernanceToken` */\n function _addGovernanceToken(\n address _tokenAddress,\n uint256 _weight\n ) internal virtual {\n if (!IERC721(_tokenAddress).supportsInterface(0x80ac58cd))\n revert InvalidTokenAddress();\n\n if (_weight == 0) revert NoVotingWeight();\n\n if (tokenWeights[_tokenAddress] > 0) revert TokenAlreadySet();\n\n tokenAddresses.push(_tokenAddress);\n tokenWeights[_tokenAddress] = _weight;\n\n emit GovernanceTokenAdded(_tokenAddress, _weight);\n }\n\n /** Internal implementation of `updateVotingPeriod`. */\n function _updateVotingPeriod(uint32 _votingPeriod) internal virtual {\n votingPeriod = _votingPeriod;\n emit VotingPeriodUpdated(_votingPeriod);\n }\n\n /** Internal implementation of `updateQuorumThreshold`. */\n function _updateQuorumThreshold(uint256 _quorumThreshold) internal virtual {\n quorumThreshold = _quorumThreshold;\n emit QuorumThresholdUpdated(quorumThreshold);\n }\n\n /** Internal implementation of `updateProposerThreshold`. */\n function _updateProposerThreshold(\n uint256 _proposerThreshold\n ) internal virtual {\n proposerThreshold = _proposerThreshold;\n emit ProposerThresholdUpdated(_proposerThreshold);\n }\n\n /**\n * Internal function for casting a vote on a Proposal.\n *\n * @param _proposalId id of the Proposal\n * @param _voter address casting the vote\n * @param _voteType vote support, as defined in VoteType\n * @param _tokenAddresses list of ERC-721 addresses that correspond to ids in _tokenIds\n * @param _tokenIds list of unique token ids that correspond to their ERC-721 address in _tokenAddresses\n */\n function _vote(\n uint32 _proposalId,\n address _voter,\n uint8 _voteType,\n address[] memory _tokenAddresses,\n uint256[] memory _tokenIds\n ) internal virtual {\n uint256 weight;\n\n // verifies the voter holds the NFTs and returns the total weight associated with their tokens\n // the frontend will need to determine whether an address can vote on a proposal, as it is possible\n // to vote twice if you get more weight later on\n for (uint256 i = 0; i < _tokenAddresses.length; ) {\n address tokenAddress = _tokenAddresses[i];\n uint256 tokenId = _tokenIds[i];\n\n if (_voter != IERC721(tokenAddress).ownerOf(tokenId)) {\n revert IdNotOwned(tokenId);\n }\n\n if (\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] ==\n true\n ) {\n revert IdAlreadyVoted(tokenId);\n }\n\n weight += tokenWeights[tokenAddress];\n proposalVotes[_proposalId].hasVoted[tokenAddress][tokenId] = true;\n unchecked {\n ++i;\n }\n }\n\n if (weight == 0) revert NoVotingWeight();\n\n ProposalVotes storage proposal = proposalVotes[_proposalId];\n\n if (proposal.votingEndBlock == 0) revert InvalidProposal();\n\n if (block.number > proposal.votingEndBlock) revert VotingEnded();\n\n if (_voteType == uint8(VoteType.NO)) {\n proposal.noVotes += weight;\n } else if (_voteType == uint8(VoteType.YES)) {\n proposal.yesVotes += weight;\n } else if (_voteType == uint8(VoteType.ABSTAIN)) {\n proposal.abstainVotes += weight;\n } else {\n revert InvalidVote();\n }\n\n emit Voted(_voter, _proposalId, _voteType, _tokenAddresses, _tokenIds);\n }\n}\n" + }, + "contracts/azorius/strategies/LinearERC721VotingWithHatsProposalCreation.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport {LinearERC721VotingExtensible} from \"./LinearERC721VotingExtensible.sol\";\nimport {HatsProposalCreationWhitelist} from \"./HatsProposalCreationWhitelist.sol\";\nimport {IHats} from \"../../interfaces/hats/IHats.sol\";\n\n/**\n * An [Azorius](./Azorius.md) [BaseStrategy](./BaseStrategy.md) implementation that\n * enables linear (i.e. 1 to 1) ERC721 based token voting, with proposal creation\n * restricted to users wearing whitelisted Hats.\n */\ncontract LinearERC721VotingWithHatsProposalCreation is\n HatsProposalCreationWhitelist,\n LinearERC721VotingExtensible\n{\n /**\n * Sets up the contract with its initial parameters.\n *\n * @param initializeParams encoded initialization parameters: `address _owner`,\n * `address[] memory _tokens`, `uint256[] memory _weights`, `address _azoriusModule`,\n * `uint32 _votingPeriod`, `uint256 _quorumThreshold`, `uint256 _basisNumerator`,\n * `address _hatsContract`, `uint256[] _initialWhitelistedHats`\n */\n function setUp(\n bytes memory initializeParams\n )\n public\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n {\n (\n address _owner,\n address[] memory _tokens,\n uint256[] memory _weights,\n address _azoriusModule,\n uint32 _votingPeriod,\n uint256 _quorumThreshold,\n uint256 _basisNumerator,\n address _hatsContract,\n uint256[] memory _initialWhitelistedHats\n ) = abi.decode(\n initializeParams,\n (\n address,\n address[],\n uint256[],\n address,\n uint32,\n uint256,\n uint256,\n address,\n uint256[]\n )\n );\n\n LinearERC721VotingExtensible.setUp(\n abi.encode(\n _owner,\n _tokens,\n _weights,\n _azoriusModule,\n _votingPeriod,\n _quorumThreshold,\n 0, // _proposerThreshold is zero because we only care about the hat check\n _basisNumerator\n )\n );\n\n HatsProposalCreationWhitelist.setUp(\n abi.encode(_hatsContract, _initialWhitelistedHats)\n );\n }\n\n /** @inheritdoc HatsProposalCreationWhitelist*/\n function isProposer(\n address _address\n )\n public\n view\n override(HatsProposalCreationWhitelist, LinearERC721VotingExtensible)\n returns (bool)\n {\n return HatsProposalCreationWhitelist.isProposer(_address);\n }\n}\n" + }, + "contracts/interfaces/hats/HatsErrors.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsErrors {\n /// @notice Emitted when `user` is attempting to perform an action on `hatId` but is not wearing one of `hatId`'s admin hats\n /// @dev Can be equivalent to `NotHatWearer(buildHatId(hatId))`, such as when emitted by `approveLinkTopHatToTree` or `relinkTopHatToTree`\n error NotAdmin(address user, uint256 hatId);\n\n /// @notice Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat\n error NotHatWearer();\n\n /// @notice Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat\n error NotAdminOrWearer();\n\n /// @notice Emitted when attempting to mint `hatId` but `hatId`'s maxSupply has been reached\n error AllHatsWorn(uint256 hatId);\n\n /// @notice Emitted when attempting to create a hat with a level 14 hat as its admin\n error MaxLevelsReached();\n\n /// @notice Emitted when an attempted hat id has empty intermediate level(s)\n error InvalidHatId();\n\n /// @notice Emitted when attempting to mint `hatId` to a `wearer` who is already wearing the hat\n error AlreadyWearingHat(address wearer, uint256 hatId);\n\n /// @notice Emitted when attempting to mint a non-existant hat\n error HatDoesNotExist(uint256 hatId);\n\n /// @notice Emmitted when attempting to mint or transfer a hat that is not active\n error HatNotActive();\n\n /// @notice Emitted when attempting to mint or transfer a hat to an ineligible wearer\n error NotEligible();\n\n /// @notice Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module\n error NotHatsToggle();\n\n /// @notice Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module\n error NotHatsEligibility();\n\n /// @notice Emitted when array arguments to a batch function have mismatching lengths\n error BatchArrayLengthMismatch();\n\n /// @notice Emitted when attempting to mutate or transfer an immutable hat\n error Immutable();\n\n /// @notice Emitted when attempting to change a hat's maxSupply to a value lower than its current supply\n error NewMaxSupplyTooLow();\n\n /// @notice Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin\n error CircularLinkage();\n\n /// @notice Emitted when attempting to link or relink a tophat to a separate tree\n error CrossTreeLinkage();\n\n /// @notice Emitted when attempting to link a tophat without a request\n error LinkageNotRequested();\n\n /// @notice Emitted when attempting to unlink a tophat that does not have a wearer\n /// @dev This ensures that unlinking never results in a bricked tophat\n error InvalidUnlink();\n\n /// @notice Emmited when attempting to change a hat's eligibility or toggle module to the zero address\n error ZeroAddress();\n\n /// @notice Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)\n /// @dev This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI\n /// to be so long that reading it exceeds the block gas limit, breaking `uri()` and `viewHat()`\n error StringTooLong();\n}\n" + }, + "contracts/interfaces/hats/HatsEvents.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface HatsEvents {\n /// @notice Emitted when a new hat is created\n /// @param id The id for the new hat\n /// @param details A description of the Hat\n /// @param maxSupply The total instances of the Hat that can be worn at once\n /// @param eligibility The address that can report on the Hat wearer's status\n /// @param toggle The address that can deactivate the Hat\n /// @param mutable_ Whether the hat's properties are changeable after creation\n /// @param imageURI The image uri for this hat and the fallback for its\n event HatCreated(\n uint256 id,\n string details,\n uint32 maxSupply,\n address eligibility,\n address toggle,\n bool mutable_,\n string imageURI\n );\n\n /// @notice Emitted when a hat wearer's standing is updated\n /// @dev Eligibility is excluded since the source of truth for eligibility is the eligibility module and may change without a transaction\n /// @param hatId The id of the wearer's hat\n /// @param wearer The wearer's address\n /// @param wearerStanding Whether the wearer is in good standing for the hat\n event WearerStandingChanged(\n uint256 hatId,\n address wearer,\n bool wearerStanding\n );\n\n /// @notice Emitted when a hat's status is updated\n /// @param hatId The id of the hat\n /// @param newStatus Whether the hat is active\n event HatStatusChanged(uint256 hatId, bool newStatus);\n\n /// @notice Emitted when a hat's details are updated\n /// @param hatId The id of the hat\n /// @param newDetails The updated details\n event HatDetailsChanged(uint256 hatId, string newDetails);\n\n /// @notice Emitted when a hat's eligibility module is updated\n /// @param hatId The id of the hat\n /// @param newEligibility The updated eligibiliy module\n event HatEligibilityChanged(uint256 hatId, address newEligibility);\n\n /// @notice Emitted when a hat's toggle module is updated\n /// @param hatId The id of the hat\n /// @param newToggle The updated toggle module\n event HatToggleChanged(uint256 hatId, address newToggle);\n\n /// @notice Emitted when a hat's mutability is updated\n /// @param hatId The id of the hat\n event HatMutabilityChanged(uint256 hatId);\n\n /// @notice Emitted when a hat's maximum supply is updated\n /// @param hatId The id of the hat\n /// @param newMaxSupply The updated max supply\n event HatMaxSupplyChanged(uint256 hatId, uint32 newMaxSupply);\n\n /// @notice Emitted when a hat's image URI is updated\n /// @param hatId The id of the hat\n /// @param newImageURI The updated image URI\n event HatImageURIChanged(uint256 hatId, string newImageURI);\n\n /// @notice Emitted when a tophat linkage is requested by its admin\n /// @param domain The domain of the tree tophat to link\n /// @param newAdmin The tophat's would-be admin in the parent tree\n event TopHatLinkRequested(uint32 domain, uint256 newAdmin);\n\n /// @notice Emitted when a tophat is linked to a another tree\n /// @param domain The domain of the newly-linked tophat\n /// @param newAdmin The tophat's new admin in the parent tree\n event TopHatLinked(uint32 domain, uint256 newAdmin);\n}\n" + }, + "contracts/interfaces/hats/IHats.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\nimport \"./IHatsIdUtilities.sol\";\nimport \"./HatsErrors.sol\";\nimport \"./HatsEvents.sol\";\n\ninterface IHats is IHatsIdUtilities, HatsErrors, HatsEvents {\n function mintTopHat(\n address _target,\n string memory _details,\n string memory _imageURI\n ) external returns (uint256 topHatId);\n\n function createHat(\n uint256 _admin,\n string calldata _details,\n uint32 _maxSupply,\n address _eligibility,\n address _toggle,\n bool _mutable,\n string calldata _imageURI\n ) external returns (uint256 newHatId);\n\n function batchCreateHats(\n uint256[] calldata _admins,\n string[] calldata _details,\n uint32[] calldata _maxSupplies,\n address[] memory _eligibilityModules,\n address[] memory _toggleModules,\n bool[] calldata _mutables,\n string[] calldata _imageURIs\n ) external returns (bool success);\n\n function getNextId(uint256 _admin) external view returns (uint256 nextId);\n\n function mintHat(\n uint256 _hatId,\n address _wearer\n ) external returns (bool success);\n\n function batchMintHats(\n uint256[] calldata _hatIds,\n address[] calldata _wearers\n ) external returns (bool success);\n\n function setHatStatus(\n uint256 _hatId,\n bool _newStatus\n ) external returns (bool toggled);\n\n function checkHatStatus(uint256 _hatId) external returns (bool toggled);\n\n function setHatWearerStatus(\n uint256 _hatId,\n address _wearer,\n bool _eligible,\n bool _standing\n ) external returns (bool updated);\n\n function checkHatWearerStatus(\n uint256 _hatId,\n address _wearer\n ) external returns (bool updated);\n\n function renounceHat(uint256 _hatId) external;\n\n function transferHat(uint256 _hatId, address _from, address _to) external;\n\n /*//////////////////////////////////////////////////////////////\n HATS ADMIN FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function makeHatImmutable(uint256 _hatId) external;\n\n function changeHatDetails(\n uint256 _hatId,\n string memory _newDetails\n ) external;\n\n function changeHatEligibility(\n uint256 _hatId,\n address _newEligibility\n ) external;\n\n function changeHatToggle(uint256 _hatId, address _newToggle) external;\n\n function changeHatImageURI(\n uint256 _hatId,\n string memory _newImageURI\n ) external;\n\n function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;\n\n function requestLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat\n ) external;\n\n function approveLinkTopHatToTree(\n uint32 _topHatId,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;\n\n function relinkTopHatWithinTree(\n uint32 _topHatDomain,\n uint256 _newAdminHat,\n address _eligibility,\n address _toggle,\n string calldata _details,\n string calldata _imageURI\n ) external;\n\n /*//////////////////////////////////////////////////////////////\n VIEW FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n function viewHat(\n uint256 _hatId\n )\n external\n view\n returns (\n string memory details,\n uint32 maxSupply,\n uint32 supply,\n address eligibility,\n address toggle,\n string memory imageURI,\n uint16 lastHatId,\n bool mutable_,\n bool active\n );\n\n function isWearerOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isWearer);\n\n function isAdminOfHat(\n address _user,\n uint256 _hatId\n ) external view returns (bool isAdmin);\n\n function isInGoodStanding(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool standing);\n\n function isEligible(\n address _wearer,\n uint256 _hatId\n ) external view returns (bool eligible);\n\n function getHatEligibilityModule(\n uint256 _hatId\n ) external view returns (address eligibility);\n\n function getHatToggleModule(\n uint256 _hatId\n ) external view returns (address toggle);\n\n function getHatMaxSupply(\n uint256 _hatId\n ) external view returns (uint32 maxSupply);\n\n function hatSupply(uint256 _hatId) external view returns (uint32 supply);\n\n function getImageURIForHat(\n uint256 _hatId\n ) external view returns (string memory _uri);\n\n function balanceOf(\n address wearer,\n uint256 hatId\n ) external view returns (uint256 balance);\n\n function balanceOfBatch(\n address[] calldata _wearers,\n uint256[] calldata _hatIds\n ) external view returns (uint256[] memory);\n\n function uri(uint256 id) external view returns (string memory _uri);\n}\n" + }, + "contracts/interfaces/hats/IHatsIdUtilities.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\n// Copyright (C) 2023 Haberdasher Labs\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.8.13;\n\ninterface IHatsIdUtilities {\n function buildHatId(\n uint256 _admin,\n uint16 _newHat\n ) external pure returns (uint256 id);\n\n function getHatLevel(uint256 _hatId) external view returns (uint32 level);\n\n function getLocalHatLevel(\n uint256 _hatId\n ) external pure returns (uint32 level);\n\n function isTopHat(uint256 _hatId) external view returns (bool _topHat);\n\n function isLocalTopHat(\n uint256 _hatId\n ) external pure returns (bool _localTopHat);\n\n function isValidHatId(\n uint256 _hatId\n ) external view returns (bool validHatId);\n\n function getAdminAtLevel(\n uint256 _hatId,\n uint32 _level\n ) external view returns (uint256 admin);\n\n function getAdminAtLocalLevel(\n uint256 _hatId,\n uint32 _level\n ) external pure returns (uint256 admin);\n\n function getTopHatDomain(\n uint256 _hatId\n ) external view returns (uint32 domain);\n\n function getTippyTopHatDomain(\n uint32 _topHatDomain\n ) external view returns (uint32 domain);\n\n function noCircularLinkage(\n uint32 _topHatDomain,\n uint256 _linkedAdmin\n ) external view returns (bool notCircular);\n\n function sameTippyTopHatDomain(\n uint32 _topHatDomain,\n uint256 _newAdminHat\n ) external view returns (bool sameDomain);\n}\n" + }, + "contracts/mocks/MockHatsProposalCreationWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.19;\n\nimport \"../azorius/strategies/HatsProposalCreationWhitelist.sol\";\n\ncontract MockHatsProposalCreationWhitelist is HatsProposalCreationWhitelist {\n function setUp(bytes memory initializeParams) public override initializer {\n __Ownable_init();\n super.setUp(initializeParams);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file From 9e6d6601884e1fd93388ec36720f2345587b1dd6 Mon Sep 17 00:00:00 2001 From: Adam Gall Date: Wed, 6 Nov 2024 12:53:08 -0500 Subject: [PATCH 2/2] Bump version to 1.4.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e3a8666..61dd872 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fractal-framework/fractal-contracts", - "version": "1.3.1", + "version": "1.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@fractal-framework/fractal-contracts", - "version": "1.3.1", + "version": "1.4.0", "license": "MIT", "dependencies": { "@gnosis.pm/zodiac": "^1.1.4", diff --git a/package.json b/package.json index 98cba6c..401df65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fractal-framework/fractal-contracts", - "version": "1.3.1", + "version": "1.4.0", "files": [ "publish", "contracts",